Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tick formatter plot options #3042

Merged
merged 4 commits into from
Oct 5, 2018
Merged

Add tick formatter plot options #3042

merged 4 commits into from
Oct 5, 2018

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Oct 3, 2018

Adds plot options to control the axis formatting directly rather than using the Dimension.value_format which only accepts formatter functions. These accept:

  • Format strings like '%d', '%.3f' etc.
  • Python functions which are compiled to JS with flexx (or converted to a FuncFormatter in mpl)
  • TickFormatter instances (or matplotlib.ticker.Formatter instances for mpl)
  • Add unit tests
  • Add documentation (to styling plots notebook)

@philippjfr
Copy link
Member Author

@jlstevens Ready to review and merge once tests are passing.

@jlstevens
Copy link
Contributor

Looks good!

I feel that maybe we should have used bokeh's PrintfTickFormatter earlier but better late than never! I'll merge once the push build is green.

@jlstevens jlstevens merged commit 89ca901 into master Oct 5, 2018
@philippjfr
Copy link
Member Author

I feel that maybe we should have used bokeh's PrintfTickFormatter earlier but better late than never!

Definitely, I've never been able to give a good answer to questions about tick formatting.

@jlstevens
Copy link
Contributor

jlstevens commented Oct 5, 2018

Hmm, one thing...shouldn't matplotlib match the plot options here? (if possible)

@philippjfr
Copy link
Member Author

philippjfr commented Oct 5, 2018

Hmm, one thing...shouldn't matplotlib match the plot options here?

Aren't they matching?

@philippjfr philippjfr added this to the v1.11.0 milestone Nov 5, 2018
@philippjfr philippjfr deleted the add_formatter_options branch November 12, 2018 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants