cosmicfish_pylib.fisher_plot_settings

Module that contains the class for plot settings and their default values.

class cosmicfish_pylib.fisher_plot_settings.CosmicFish_PlotSettings(dictionary=None, **kwargs)[source]

Class containing the plot settings for the CosmicFish plotter.

Variables:
  • use_nice_colors – wether to use nice_colors for the plot. Not yet implemented.
  • nice_colors_palette – nice_color palette to use. Default:
  • line_colors – list of color to use for lines. Default:
  • solid_colors – list of color to use for filled stuff. Default:
  • linestyle – list of line style to use. Default:
  • D1_confidence_level – list with the confidence levels for the 1D plot. Default: [ 0.95, 0.68 ]
  • D1_num_points – number of points per line in the plot. Default: 100
  • D1_line_thickness – thickness of the line. Default: 1.0
  • D1_norm_prob – wether to normalize the distribution or set the maximum to one. Default: False
  • D1_use_nice_numbers – wether to use nice numbers when doing 1D plots. Default: True
  • D1_filled – wether to fill the gaussians highlighting the confidence levels. Default: True
  • D1_alpha – alpha used for the 1D filling. Each layer is filled with the same alpha and the superposition of the layers result in the highlihting effect. Default: 0.1
  • D1_ylabel_right – wether to put y labels on the right side of the plot. Default: False
  • D1_xlabel_up – wether to put x labels on top of the plot. Default: False
  • D1_show_x_ticks – wether to show x axis thicks in 1D plot. Default: True
  • D1_number_x_ticks – number of x thicks to show. Default: 3
  • D1_show_y_ticks – wether to show y axis thicks in 1D plot. Default: True
  • D1_number_y_ticks – number of y thicks to show. Default: 2
  • D1_show_x_ticks_labels – wether to show x axis tick label. Default: True
  • D1_show_y_ticks_labels – wether to show y axis tick label. Default: True
  • D1_show_xaxis_label – wether to show x axis label. Default: True
  • D1_show_yaxis_label – wether to show y axis label. Default: True
  • D1_x_label_rotation – rotation of the x axis label. Default: 0
  • D1_y_label_rotation – rotation of the y axis label. Default: 90
  • D1_prob_label – y axis label to use when P is not normalized. Default: u’$P/P_{rm max}$’
  • D1_norm_prob_label – y axis label to use when P is normalized. Default: u’$P$’
  • D1_main_fontsize – main fontsize for the 1D plot. Default: 10.0
  • D1_secondary_fontsize – secondary fontsize for the 1D plot. Default:
  • D1_show_best_fit – show a vertical line on the fiducial. NOT YET IMPLEMENTED. Default: False
  • D2_confidence_levels – list with confidence levels for the 2D plot. Default: [ 0.95, 0.68 ]
  • D2_num_points – number of points per line in the plot. Default: 100
  • D2_line_thickness – thickness of the lines. Default: 1.0
  • D2_use_nice_numbers – wether to use nice numbers when doing 2D plots. Default: True
  • D2_filled – wether to fill the contours highlighting the confidence levels. Default: True
  • D2_alphas – alpha for the filling of the confidence regions. Default: [ 0.40, 0.85 ]
  • D2_ylabel_right – wether to put y labels on the right side of the plot. Default: False
  • D2_xlabel_up – wether to put x labels on top of the plot. Default: False
  • D2_show_x_ticks – wether to show x axis thicks in 1D plot. Default: True
  • D2_number_x_ticks – number of x thicks to show. Default: 3
  • D2_show_y_ticks – wether to show y axis thicks in 1D plot. Default: True
  • D2_number_y_ticks – number of y thicks to show. Default: 3
  • D2_show_x_ticks_labels – wether to show x axis tick label. Default: True
  • D2_show_y_ticks_labels – wether to show y axis tick label. Default: True
  • D2_show_xaxis_label – wether to show x axis label. Default: True
  • D2_show_yaxis_label – wether to show y axis label. Default: True
  • D2_x_label_rotation – rotation of the x axis label. Default: 0
  • D2_y_label_rotation – rotation of the y axis label. Default: 90
  • D2_main_fontsize – main fontsize. Default: 10.0
  • D2_secondary_fontsize – secondary fontsize. Default: 9.0
  • D2_show_best_fit – show a vertical line on the fiducial. NOT YET IMPLEMENTED. Default: False
  • num_plots_per_line – number of plots per line. Used in all plots but triangulars. Default: 3
  • figure_width – width of the image in cm. Default: paper_width
  • figure_height – height of the image in cm. Default: paper_width
  • tight_layout – wether to use tight_layout at the end of plotting. Default: False
  • subplot_x_size – x size of the subplot in cm. Default: 5.0 cm
  • subplot_y_size – y size of the subplot in cm. Default: 5.0 cm
  • use_fixed_figure_width – wether to use a fixed size for the figure width. If true the width of the subplots is determined automatically, if false is determined by subplot_x_size. Default: False
  • use_fixed_figure_height – wether to use a fixed size for the figure height. If true the height of the subplots is determined automatically, if false is determined by subplot_y_size. Default: False
  • do_legend – wether to put the legend or not. Default: True
  • legend_filled – wether to use a legend with filled patches. Default: True
  • legend_fontsize – font size to be used in the legend. Default: 10.0
  • legend_frame – wether to put the frame on the legend. Default: True
  • legend_fancybox – wether to use a fancy box for the legend. Default: False
  • legend_shadow – wether to put the shadow below the legend. Default: False
  • legend_markerfirst – wether to put the marker first and the text after. Default: True
  • legend_ncol – number of columns of the legend. Default: 1
  • legend_loc – location of the legend, relative to the global figure if legend_takes_place_plot is False or relative to the legend sub plot if legend_takes_place_plot is True. Default: ‘lower center’
  • legend_takes_place_plot – wether the legend should take the place of an additional subplot in 1D and 2D plots. Default: False
  • legend_takes_place_plot_tri – wether the legend should take the place of an additional subplot in a triangular plot. Default: True
  • title_fontsize – fontsize of the title of the plot. Default: 10.0

CosmicFish_PlotSettings class constructor. The constructor initializes the plot settings to the default values. By default everything (font sizes, ecc..) is chosen so that every plot looks good to us... The settings can be initialized to default by passing nothing.

Parameters:
  • dictionary (dict) – dictionary containing the users settings. Settings that are not passed are initialized to their default values. If a setting is not in __accepted_settings__ it will simply be ignored.
  • kwargs – keyword arguments containing settings. Settings that are not passed in this way are either initialized to default or by dictionary. If a setting is not in __accepted_settings__ it will simply be ignored. Notice that keyword arguments have higher priority with respect to dictionary settings.
update(dictionary=None, **kwargs)[source]

Update settings. Works very similarly to the class constructor with the difference being that settings that are not passed are not initialized to default.

Parameters:
  • dictionary (dict) – dictionary containing the users settings. Settings that are not passed are not changed. If a setting is not in __accepted_settings__ it will simply be ignored.
  • kwargs – keyword arguments containing settings. Settings that are not passed are not changed. If a setting is not in __accepted_settings__ it will simply be ignored. Notice that keyword arguments have higher priority with respect to dictionary settings.
cosmicfish_pylib.fisher_plot_settings.cm_to_inch = 0.39370078740157477

conversion factor from centimeter to inches

cosmicfish_pylib.fisher_plot_settings.inch_to_cm = 2.54

conversion factor from inches to centimeter

cosmicfish_pylib.fisher_plot_settings.mm_to_points = 2.8346438836888925

conversion factor from mm to points

cosmicfish_pylib.fisher_plot_settings.paper_width = 21.0

width of an A4 paper in cm

cosmicfish_pylib.fisher_plot_settings.points_to_mm = 0.352778

conversion factor from points to mm