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

Custom text location #415

Open
jonas-eschle opened this issue Mar 31, 2023 · 3 comments
Open

Custom text location #415

jonas-eschle opened this issue Mar 31, 2023 · 3 comments

Comments

@jonas-eschle
Copy link
Contributor

jonas-eschle commented Mar 31, 2023

Currently, some of the functions (such as mplhep.lhcb.text) take a loc keyword that has to be a number, hardcoded. For the LHCb-style, these are all left-aligned.

How should new locations be added? Or is there the possibility to specify an arbitrary location?

@andrzejnovak
Copy link
Member

I think you can add another number. Replacing these with keywords would be fine for me as well, though I'd prefer it to not get too verbose.

@jonas-eschle
Copy link
Contributor Author

When you say "adding another number", do you mean to hardcode it inside the plotting function? That means there is no way for a user to choose an arbitrary location? I .e. could loc allow for, say, a tuple of x, y coords? Or something else, more mpl standardized maybe?

@andrzejnovak
Copy link
Member

Oh, I see. I think I misunderstood. I'd be ok with making loc also take an (x,y) tuples. The initial idea here was to offer a set of predefined locations that are commonly used and hard-code them to prevent the situation where eg every "CMS Simulation" label had a slightly different size ratio, a slightly different gap between words, or different spacing from the label to the x and y-axis. I assumed that's close to 100% of use cases, but if not I have no problem with that being extended.

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