User Tools

Site Tools


other:python:matplotlib_by_jyp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
other:python:matplotlib_by_jyp [2021/05/11 15:03]
jypeter [Useful matplotlib reference pages] More ticks and labels stuff
other:python:matplotlib_by_jyp [2021/10/26 09:26]
jypeter Added the unsorted stuff section
Line 142: Line 142:
 ['​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**:
Line 157: Line 158:
       * [[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''​
Line 246: Line 248:
 [[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 */
other/python/matplotlib_by_jyp.txt · Last modified: 2023/10/26 08:39 by jypeter