-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Doc: Update timeline example #13719
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
Doc: Update timeline example #13719
Conversation
if 'rc' not in item['tag_name'] and 'b' not in item['tag_name']: | ||
dates.append(item['published_at'].split("T")[0]) | ||
names.append(item['tag_name']) | ||
except: |
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.
except: | |
except Exception: |
No bare except (see last paragraph of https://docs.python.org/2/howto/doanddont.html#except). Not that it really matters here, but we shouldn't use bad style.
use_line_collection=True) | ||
|
||
plt.setp(markerline, mec="k", mfc="w", zorder=3) | ||
markerline.set_ydata(np.zeros(len(dates))) |
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 is a hack on the original purpose of stem
. Not sure I like it, but OTOH, the loop before wasn't good either. At least, this needs explanation.
6c1dcb5
to
34c4d4b
Compare
@timhoffm Do the new changes reflect the points you raised? The docbuild fails for no apparent (to me) reason. Any idea what the problem is? |
@meeseeksdev backport to v3.1.x |
…719-on-v3.1.x Backport PR #13719 on branch v3.1.x (Doc: Update timeline example)
PR Summary
Update timeline example to fetch data from the github API. This will allow the example to update itself once new matplotlib versions are released.
Unlike in its initial proposal in #11403, this is embaced in a
try.. except
, such that the doc build will not fail in case no internet connection can be established.Also it now uses a
stem
(and is hence useful to showstem
usage).PR Checklist