-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
cleaned up 3 examples [MEP12] #6488
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Box plots with custom fill colors | ||
"""Box plots with custom fill colors.""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be worth having a small description here as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @NelleV Any suggestions? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are making me work :) Something like: But with this description, I'd remove the horizontal grid lines and replace the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not convinced, @WeatherGod what do you think? |
||
|
||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
|
@@ -29,12 +29,12 @@ | |
# adding horizontal grid lines | ||
for ax in axes: | ||
ax.yaxis.grid(True) | ||
ax.set_xticks([y+1 for y in range(len(all_data))], ) | ||
ax.set_xticks([y + 1 for y in range(len(all_data))], ) | ||
ax.set_xlabel('xlabel') | ||
ax.set_ylabel('ylabel') | ||
|
||
# add x-tick labels | ||
plt.setp(axes, xticks=[y+1 for y in range(len(all_data))], | ||
plt.setp(axes, xticks=[y + 1 for y in range(len(all_data))], | ||
xticklabels=['x1', 'x2', 'x3', 'x4']) | ||
|
||
plt.show() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
being a bit pedantic here, but this paragraph could be used to describe just about any plot. I would just leave it out, or add a some info that is more specific to this example. In particular, with MEP12, we are looking for descriptions that not only describe the figure, but also describe what feature of matplotlib is being showcased.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is a particularly flexibility testing example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about something like...
"""
A graph of multiple time series which demonstrates extensive custom
styling of plot frame, tick lines and labels, and line graph properties.
Also demonstrates the custom placement of text labels along the right edge
as an alternative to a conventional legend.
"""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!