SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
python.uq.plot.colors Namespace Reference

Functions

 get_username ()
 
 initialize_plotting_style (dtype="standard", macros="thesis")
 
 insert_legend (fig, loc="right", ncol=3, has_axis=True, shift=0.0)
 
 intToRGB (i)
 
 load_bw_color (i, nmax=11)
 
 load_color (i)
 
 load_custom_pgf_preamble (dtype="standard", macros="thesis")
 
 load_default_color_map (dtype="cmap")
 
 load_font ()
 
 load_font_properties (size=None, family=None)
 
 load_linestyle (i)
 
 load_marker (i)
 
 rgbTpInt (rgb)
 
 savefig (fig, filename, lgd=None, tikz=False, mpl3d=False, crop=False, sizes=(5.25, 5))
 

Function Documentation

◆ get_username()

python.uq.plot.colors.get_username ( )
returns the user name

Referenced by python.uq.plot.colors.load_custom_pgf_preamble().

◆ initialize_plotting_style()

python.uq.plot.colors.initialize_plotting_style (   dtype = "standard",
  macros = "thesis" 
)

◆ insert_legend()

python.uq.plot.colors.insert_legend (   fig,
  loc = "right",
  ncol = 3,
  has_axis = True,
  shift = 0.0 
)
Inserts a legend outside of the plotting area. It is possible that the
exact position (bbox_to_anchor) needs to be adjusted but once the
size of the figures is fixed, this works fine.

@param fig: figure object
@param loc: location of the legend (right, bottom, top, left)
@param ncol: number of columns for the labels
@param has_axis: defines if xticks labels are shown
@param shift: additional offset of the legend from the inner plotting area

◆ intToRGB()

python.uq.plot.colors.intToRGB (   i)

◆ load_bw_color()

python.uq.plot.colors.load_bw_color (   i,
  nmax = 11 
)
Load black and white color via index

@param i: index
@param nmax: maximum number of cycle

◆ load_color()

python.uq.plot.colors.load_color (   i)
Provide color via index
@param i: index

◆ load_custom_pgf_preamble()

python.uq.plot.colors.load_custom_pgf_preamble (   dtype = "standard",
  macros = "thesis" 
)
Load preamble for latex style plots. It includes amsmath, scientific units,
font style for springer publications, etc. If the macros parameter
is defined, then all the provided latex commands in there will be loaded
in the preamble as well.

@param dtype: string that specifies the math style (standard, springer)
@param macros: path to latex file that contains latex commands

References python.uq.plot.colors.get_username(), and python.uq.plot.colors.load_font().

Referenced by python.uq.plot.colors.initialize_plotting_style().

◆ load_default_color_map()

python.uq.plot.colors.load_default_color_map (   dtype = "cmap")
Load default color map -> viridis
@param dtype: color map identifier

◆ load_font()

python.uq.plot.colors.load_font ( )

◆ load_font_properties()

python.uq.plot.colors.load_font_properties (   size = None,
  family = None 
)

◆ load_linestyle()

python.uq.plot.colors.load_linestyle (   i)
Provide linestyle via index.
@param i: index

◆ load_marker()

python.uq.plot.colors.load_marker (   i)
Provide marker via index
@param i: index

◆ rgbTpInt()

python.uq.plot.colors.rgbTpInt (   rgb)

◆ savefig()

python.uq.plot.colors.savefig (   fig,
  filename,
  lgd = None,
  tikz = False,
  mpl3d = False,
  crop = False,
  sizes = (5.25, 5) 
)
Save a figure in various formats.

@param fig: figure object
@param filename: filename (without extension) where the file should be stored
@param lgd: legend object
@param tikz: save result as tikz file using matplotlib2tikz
@param mpl3d: is it a 3d plot? Then one should not use a tight layout
@param crop: crop the resulting pdf -> pdfcrop needs to be installed
@param sizes: tuple containing the figures size in x and y direction in inches