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

fix fillstyle=None and respect legendstyle in root2matplotlib.hist #340

Merged
merged 2 commits into from Jun 20, 2013

Conversation

ndawe
Copy link
Member

@ndawe ndawe commented Jun 20, 2013

from matplotlib import pyplot as plt
from rootpy.plotting import root2matplotlib as rplt
from rootpy.plotting import Hist

a = Hist(100, -5, 5, title='A')
b = a.Clone(title='B')

a.fillstyle = None
a.linewidth = 2
a.linecolor = 'red'
a.linestyle = 'dashed'
a.legendstyle = 'L'

b.fillstyle = 'solid'
b.fillcolor = 'blue'
b.linecolor = 'green'
b.linestyle = 'solid'
b.legendstyle = 'F'

a.FillRandom('gaus', 1000)
b.FillRandom('gaus', 1000)

plt.figure()
rplt.hist([a, b], stacked=True)
plt.legend()
plt.show()

figure_1

pwaller added a commit that referenced this pull request Jun 20, 2013
fix fillstyle=None and respect legendstyle in root2matplotlib.hist
@pwaller pwaller merged commit ebfeea1 into rootpy:master Jun 20, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants