Section Navigation
fill_between
plt.subplots
histtype
floating_axes
Note
Go to the endto download the full example code.
Plot with radians from the basic_units mockup example package.
This example shows how the unit class can determine the tick locating,formatting and axis labeling.
This example requiresbasic_units.py
basic_units.py
frombasic_unitsimportcos,degrees,radiansimportmatplotlib.pyplotaspltimportnumpyasnpx=[val*radiansforvalinnp.arange(0,15,0.01)]fig,axs=plt.subplots(2)axs[0].plot(x,cos(x),xunits=radians)axs[1].plot(x,cos(x),xunits=degrees)fig.tight_layout()plt.show()
DownloadJupyternotebook:radian_demo.ipynb
DownloadPythonsourcecode:radian_demo.py
Downloadzipped:radian_demo.zip
Gallery generated by Sphinx-Gallery