How do I change the frequency of gridlines?

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

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

  https://github.com/bokeh/bokeh/pull/2186

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, [email protected] 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 [email protected].
To post to this group, send email to [email protected].
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.

FYI this PR has been merged.

···

On Apr 18, 2015, at 3:50 PM, Bryan Van de Ven <[email protected]> wrote:

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

  https://github.com/bokeh/bokeh/pull/2186

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, [email protected] 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 [email protected].
To post to this group, send email to [email protected].
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.