Last active
April 1, 2019 00:57
-
-
Save razhangwei/40d19fb14b8da6b12e48140b8a010181 to your computer and use it in GitHub Desktop.
extract and modify data from Figure #matplotlib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the better practice would be always export your data along with the graph | |
# maybe in the future when mpld3.fig_to_json() has been greately improved, | |
# one can simply use this function. | |
fig = ... | |
ax = fig.axes[0] | |
# line | |
line = ax.lines[0] | |
line.set_ydata(line.get_ydata() + 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment