☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How do I change the frequency of gridlines?

Community Support
sparog.throstur
sparog.throstur

I feel like I’ve spent way too much time trying to figure out such a little detail…

How do I increase the number of gridlines? I want more vertical gridlines but I can’t figure out how to make it happen.

Best regards

⌁   Link to post
Bryan
Bryan

Unfortunately exposing this tunable parameter to the Python side was overlooked long ago. I have opened a PR to add it:

  Expose desired_num_ticks on tickers by bryevdv · Pull Request #2186 · bokeh/bokeh · GitHub

Which you can use by, for example:

  p.ygrid[0].ticker.desired_num_ticks = 20

Note that "desired_num_ticks" is a *suggestion*. It does not make sense at all for some tickers (like single interval tickers), so they may ignore it completely. Other tickers like the standard adaptive ticker that try to pick "nice" numbers for ticks, will merely treat it as a target to approximate as best as can be done, while still picking "nice" numbers. If you need finer, complete control over the exact number and location of ticks, this is still an open issue. It would probably not be hard to add a "FixedLocationTicker" and I would be happy to help anyone interested work up a PR to add this capability.

Bryan

···

On Apr 18, 2015, at 3:14 PM, sparog.throstur@gmail.com wrote:

I feel like I've spent way too much time trying to figure out such a little detail...

How do I increase the number of gridlines? I want more vertical gridlines but I can't figure out how to make it happen.

Best regards

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4fd55a24-fcd4-4745-b02a-af453244a21b%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Bryan
Bryan

FYI this PR has been merged.

···

On Apr 18, 2015, at 3:50 PM, Bryan Van de Ven <bryan@bokeh.org> wrote:

Unfortunately exposing this tunable parameter to the Python side was overlooked long ago. I have opened a PR to add it:

  Expose desired_num_ticks on tickers by bryevdv · Pull Request #2186 · bokeh/bokeh · GitHub

Which you can use by, for example:

  p.ygrid[0].ticker.desired_num_ticks = 20

Note that "desired_num_ticks" is a *suggestion*. It does not make sense at all for some tickers (like single interval tickers), so they may ignore it completely. Other tickers like the standard adaptive ticker that try to pick "nice" numbers for ticks, will merely treat it as a target to approximate as best as can be done, while still picking "nice" numbers. If you need finer, complete control over the exact number and location of ticks, this is still an open issue. It would probably not be hard to add a "FixedLocationTicker" and I would be happy to help anyone interested work up a PR to add this capability.

Bryan

On Apr 18, 2015, at 3:14 PM, sparog.throstur@gmail.com wrote:

I feel like I've spent way too much time trying to figure out such a little detail...

How do I increase the number of gridlines? I want more vertical gridlines but I can't figure out how to make it happen.

Best regards

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/4fd55a24-fcd4-4745-b02a-af453244a21b%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled