Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
other:python:matplotlib_by_jyp [2021/05/11 17:03] – [Useful matplotlib reference pages] More ticks and labels stuff jypeter | other:python:matplotlib_by_jyp [2021/10/26 11:26] – Added the unsorted stuff section jypeter |
---|
['START', '0.2', '0.4', '0.6', 'END'] | ['START', '0.2', '0.4', '0.6', 'END'] |
</code> | </code> |
| * You can also use fancy [[https://matplotlib.org/stable/gallery/ticks_and_spines/tick-formatters.html|tick formatters]] |
* Many more options for ticks, labels, orientation, ... | * Many more options for ticks, labels, orientation, ... |
* **Grid lines**: | * **Grid lines**: |
* [[https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.html|plot(...)]]: //fmt// (see documentation) or ''marker'' and ''markerfacecolor''/''mfc'' (and ''markerfacecoloralt''/''mfcalt'' for dual color markers), ''markersize'', ''markeredgewidth''/''mew'', ''markeredgecolor'' (use ''markeredgecolor='none''' if you don't want to plot the edge of the markers), ''fillstyle'' (''full'', ''None'', [[https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.htm|other]]) | * [[https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.html|plot(...)]]: //fmt// (see documentation) or ''marker'' and ''markerfacecolor''/''mfc'' (and ''markerfacecoloralt''/''mfcalt'' for dual color markers), ''markersize'', ''markeredgewidth''/''mew'', ''markeredgecolor'' (use ''markeredgecolor='none''' if you don't want to plot the edge of the markers), ''fillstyle'' (''full'', ''None'', [[https://matplotlib.org/stable/gallery/lines_bars_and_markers/marker_reference.htm|other]]) |
* [[https://matplotlib.org/api/_as_gen/matplotlib.pyplot.scatter.html|scatter(...)]]: ''marker'' (marker type), ''c'' (color), ''s'' (size), ''linewidths'' (linewidth of the marker edges), ''edgecolors'' | * [[https://matplotlib.org/api/_as_gen/matplotlib.pyplot.scatter.html|scatter(...)]]: ''marker'' (marker type), ''c'' (color), ''s'' (size), ''linewidths'' (linewidth of the marker edges), ''edgecolors'' |
* [[https://matplotlib.org/api/colors_api.html|colors]] and colormaps | * [[https://matplotlib.org/stable/api/colors_api.html|colors]] and colormaps |
* [[https://matplotlib.org/stable/gallery/color/color_demo.html|color demo]] | * [[https://matplotlib.org/stable/gallery/color/color_demo.html|color demo]] |
* [[https://matplotlib.org/examples/color/named_colors.html|named colors]] | * [[https://matplotlib.org/stable/gallery/color/named_colors.html#sphx-glr-gallery-color-named-colors-py|named colors]] |
| * [[https://www.w3schools.com/colors/colors_picker.asp|HTML color picker]] and different ways of choosing colors |
* Reverting the colors: add ''_r'' at the end of the colormap name | * Reverting the colors: add ''_r'' at the end of the colormap name |
* Number of colors in the //my_cmap// colormap (usually 256): ''my_cmap.N'' | * Number of colors in the //my_cmap// colormap (usually 256): ''my_cmap.N'' |
[[https://stackoverflow.com/questions/9797520/masking-part-of-a-contourf-plot-in-matplotlib|trick source]] | [[https://stackoverflow.com/questions/9797520/masking-part-of-a-contourf-plot-in-matplotlib|trick source]] |
| |
| ===== Unsorted matplotlib stuff ===== |
| |
| Some useful notes and links that cannot be placed (yet) in a section of the main page |
| |
| ==== Plotting arcs (segments of ellipses) ==== |
| |
| * [[https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.Arc.html|Offical patches.Arc documentation]] |
| * A nice [[https://stackoverflow.com/questions/54849976/can-someone-explain-the-different-parameters-in-matplotlib-patches-arc|ellipses and arcs tutorial]] on stackoverflow |
| |
/* standard page footer */ | /* standard page footer */ |