Giter Club home page Giter Club logo

Comments (12)

andrzejnovak avatar andrzejnovak commented on June 16, 2024

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.

kratsg avatar kratsg commented on June 16, 2024

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.

andrzejnovak avatar andrzejnovak commented on June 16, 2024

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.

matthewfeickert avatar matthewfeickert commented on June 16, 2024

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.

andrzejnovak avatar andrzejnovak commented on June 16, 2024

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.

matthewfeickert avatar matthewfeickert commented on June 16, 2024

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.

andrzejnovak avatar andrzejnovak commented on June 16, 2024

@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.

kratsg avatar kratsg commented on June 16, 2024
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.

andrzejnovak avatar andrzejnovak commented on June 16, 2024

So really pretty much the same as for CMS right?

from mplhep.

kratsg avatar kratsg commented on June 16, 2024

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.

andrzejnovak avatar andrzejnovak commented on June 16, 2024

#39 should add atlas options

hep.atlas.atlastext()
hep.atlas.atlaslabel().

I'm open to better names

from mplhep.

andrzejnovak avatar andrzejnovak commented on June 16, 2024

@matthewfeickert @kratsg anything else or can I close this?

from mplhep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.