python.uq.plot.colors Namespace Reference


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

Function Documentation

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

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

def python.uq.plot.colors.initialize_plotting_style (   dtype = "standard",
  macros = "thesis",
  style = "seaborn-paper" 
Initialize the plotting style for the current python session.

@param dtype: font style type (standard, springer)
@param macros: path to commands latex file -> containing (newcommand)
@param style: plot style

References python.uq.plot.colors.load_custom_pgf_preamble().

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

def 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

References python.uq.plot.colors.load_font_properties().

def python.uq.plot.colors.intToRGB (   i)
def 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
def python.uq.plot.colors.load_color (   i)
def 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(), python.uq.plot.colors.initialize_plotting_style(), python.uq.plot.colors.load_default_color_map(), and python.uq.plot.colors.load_font().

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

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

Referenced by python.uq.plot.colors.load_custom_pgf_preamble(), and python.uq.plot.plot3d.plotSG3d().

def python.uq.plot.colors.load_font ( )
def python.uq.plot.colors.load_font_properties (   size = None,
  family = None 
def python.uq.plot.colors.load_linestyle (   i)
Provide linestyle via index.
@param i: index
def python.uq.plot.colors.load_marker (   i)
Provide marker via index
@param i: index
def python.uq.plot.colors.rgbTpInt (   rgb)
def python.uq.plot.colors.savefig (   fig,
  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

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