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

Additional customisation options #21

Open
eshwen opened this issue Nov 9, 2019 · 4 comments
Open

Additional customisation options #21

eshwen opened this issue Nov 9, 2019 · 4 comments

Comments

@eshwen
Copy link
Contributor

eshwen commented Nov 9, 2019

Some small, additional customisation options could be useful (or used as default):

  • Option for hatched error bar on background MC instead of filled (in main plot)
  • Alter the range of the data/MC sub-plot (e.g., 0.5 - 1.5)
@eshwen
Copy link
Contributor Author

eshwen commented Nov 16, 2019

Chopping off the additional whitespace on the x-axis would be nice by default (i.e., when x-limits are not set explicitly). Examples are shown below.

Current default x-limits (the HT range in the dataframes was 200-2000):

current_xlim

Preferred default x-limits:
preferred_xlim

The addition of overflow bins would also be nice, perhaps as an option. On the x-axis, they could be given a width equal to the other bins if all the bins are the same width, or if it's variable width it can adopt the bin width of the previous bin or something

@benkrikler
Copy link
Member

Good suggestions. Happy to have PRs to address them!

For the last point, the matplotlib function that we need is: https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.margins.html

@eshwen
Copy link
Contributor Author

eshwen commented Feb 25, 2020

Good suggestions. Happy to have PRs to address them!

For the last point, the matplotlib function that we need is: https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.margins.html

Could we get this implemented either by default or a config entry or something? Since it's matplotlib > 3 (so only applies to Python 3), I'm not sure how straightforward it would be

@benkrikler
Copy link
Member

I think I failed to mention this properly in the last PR I added, but the newest version of plotter should implement this already. If instead of passing a 2-tuple of floats to the limits section for an axis, you give a float followed by a percent symbol, that float will be used to set the margins of the axis. So I think giving 0% might achieve what you want. E.g.

limits: 
    y: [1e-2, 1e7]
    x: 0%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants