Comments (12)
I agree. cms.style
contains styling helpers I use specifically for CMS. I'd be happy to include equivalent functions for ATLAS, but I don't know what is typically needed.
from mplhep.
I don't understand what API parity means here. There's no special function for atlas styles specifically, other than importing and setting the mpl styles. I didn't use anything more to make our plots for the pyhf pub notes.
from mplhep.
Right now the only CMS specific part is the main plot label i.e. CMS Preliminary , which is a bit finicky to get right, which is why I outsourced it here. We could presumably do something similar for ATLAS.
from mplhep.
I don't understand what API parity means here.
Perhaps "consistency" is a better choice of words? I just mean that if you look at mplhep.cms.style
and mplhep.atlas.style
there are currently different in that the README
shows that one must do
plt.style.use(hep.cms.style.ROOT)
plt.style.use(hep.atlas.style.ATLAS)
to use different styles. It would be nicer in my mind to have them be unified such that for the different experiments one would just do
plt.style.use(hep.<experiment>.style.ROOT)
from mplhep.
While I agree in general, as of now, we have only two styles. I am also not sure if there are meaningful differences between general ROOT and specific CMS (maybe figure aspect).
I also originally thought to have all styles unique, such that they can be called as hep.style.ATLAS
or hard copied to mpl cache, but I'm happy to revise it.
from mplhep.
I also originally thought to have all styles unique, such that they can be called as
hep.style.ATLAS
Fair. Whatever API you prefer is fine by me, just let me know, and we can go from there.
from mplhep.
@matthewfeickert @kratsg One obvious thing to generalize is the experiment label (hep.cms.cmslabel
) could you post some examples/spec of the labelling typically used in ATLAS?
from mplhep.
atlas: &atlas
x: 0.225
y: 0.88
font: 73
size: 25
label: ATLAS
internal: &internal
x: 0.35
font: 43
label: Internal
<<: *atlas
atlasinternal: &atlasinternal
- *atlas
- *internal
used in this code: https://github.com/kratsg/TakeOverTheWorld/blob/989c97382689d77649bdf29e00f10d509a6c7b90/totw.py#L413-L421
# attach the label
label = ROOT.TLatex(text['x'], text['y'], text['label'])
label.SetTextFont(text['font'])
label.SetTextSize(text['size'])
label.SetNDC()
label.Draw()
Internal is replaced with Simulation, Preliminary, etc... as needed.
from mplhep.
So really pretty much the same as for CMS right?
from mplhep.
So really pretty much the same as for CMS right?
It should be. we should build the generic addExperimentLabel
function and then an addATLASLabel / addCMSLabel
.
from mplhep.
#39 should add atlas options
hep.atlas.atlastext()
hep.atlas.atlaslabel().
I'm open to better names
from mplhep.
@matthewfeickert @kratsg anything else or can I close this?
from mplhep.
Related Issues (20)
- mplhep styles with contourf log scale causes hang HOT 8
- Chaning colors of bars created by histplot makes bar position change HOT 2
- Add HEAD of dependencies GHA workflow HOT 1
- Upload of pytest_results artifact 'fails with no files were found' HOT 3
- `density=True` does not account for bin edges
- bug: mplhep logo placement is slow.. HOT 1
- histplot() with histtype="errorbar" crashes when data contains inf or nan HOT 3
- ENH: Add a `density` option for hist2dplot?
- mplhep LHCb2 style conflicts with subplots_adjust(hspace=0) HOT 1
- ENH: Gallery HOT 2
- CI failing HOT 1
- Add CITATION.cff
- Custom text location HOT 3
- Use gh-action-pypi-publish v1.7.0+ APIs
- Matplotlib warnings
- Histplot errorbars HOT 3
- [Bug] histplot raises IndexError when plotting an histogram with one bin HOT 2
- Update return type of exp label/text
- CoM in Experiment label
- TypeError when plotting 2d histograms with flow="show" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mplhep.