Skip to content

Colorbars

mmavrakis edited this page Jul 19, 2024 · 7 revisions

click this button to open a Jupyter notebook (hosted in Google Colab) to visualize, customize and save the colorbars used in PyPOLAR. This Jupyter notebook can be found here.

The Jupyter notebook generates the colorbar which is used to display the data. Each variable (see Polarimetry methods for more details) has two associated colormaps, the main one and the colorblind-friendly one.

  • The colormap for orientation angles ρ, ρcontour and ρangle, is hsv (and colorwheel from Colorcet for colorblind-friendly visualization).

  • The colormap for ψ, S2, S4, SSHG is jet (and viridis for colorblind-friendly visualization).

  • The colormap for η is plasma.

The options for the displayed colorbar are:

  • colorbar type: 'horizontal' (for all variables), 'vertical' (for all variables), 'polar90' (for η, ρcontour and ρangle) and 'polar180' (for ρ, ρcontour and ρangle)
  • color: 'k' (black), 'w' (white), or any other color to be entered manually (see matplotlib documentation for more a complete list)
  • label side: 'none' (for no labels displayed), 'right' or 'left' (for vertical colorbars), 'top' or 'bottom' (for horizontal colorbars)
  • colorblind: True or False; use the colorblind-friendly colormap if True
  • number of ticks: number of ticks and labels to be used on the colorbar
  • figure size: size of the figure to be displayed (in inches)
  • aspect ratio: ratio between the largest side and the smallest side of the colorbar to be displayed
  • font size: size of the font for the tick labels
  • font: font used for the tick labels; possibilities include 'DejaVu Sans', 'DejaVu Sans Mono', 'Liberation Sans', 'Liberation Sans Narrow', 'STIXGeneral'
  • font style: style of the font to be used for the tick labels; possibilities are 'bold' and 'normal'
  • save extension: the colorbar is saved using the extension specified here; possibilities are '.tif' and '.png'; click the folder icon on the left side of the notebook to locate the file
  • resolution: resolution of the image saved in the file