neurom.view.common.plot_style

neurom.view.common.plot_style(fig, ax, **kwargs)

Function to set the basic options of a matplotlib figure, to be used by viewing - plotting functions.

Parameters:
  • fig – matplotlib figure
  • ax – matplotlib axes
  • pretitle (str) – hello String to include before the general title of the figure. Default value is None.
  • posttitle (str) – String to include after the general title of the figure. Default value is None.
  • title (str) – The title for the figure Default value is “Figure”.
  • no_title (bool) – Defines the presence of a title in the figure. If True the title will be set to an empty string “”. Default value is False.
  • title_fontsize (int) – Defines the size of the title’s font. Default value is 14.
  • title_arg (dict) – Defines the arguments that will be passsed into matplotlib as title arguments. Default value is None.
  • xlabel (str) – The xlabel for the figure Default value is “X”.
  • ylabel (str) – The ylabel for the figure Default value is “Y”.
  • no_labels (bool) – Defines the presence of the labels in the figure. If True the labels will be set to an empty string “”. Default value is False.
  • no_xlabel (bool) – Defines the presence of the xlabel in the figure. If True the xlabel will be set to an empty string “”. Default value is False.
  • no_ylabel (bool) – Defines the presence of the ylabel in the figure. If True the ylabel will be set to an empty string “”. Default value is False.
  • label_fontsize (int) – Defines the size of the labels’ font. Default value is 14.
  • xlabel_arg (dict) – Defines the arguments that will be passsed into matplotlib as xlabel arguments. Default value is None.
  • ylabel_arg (dict) – Defines the arguments that will be passsed into matplotlib as ylabel arguments. Default value is None.
  • no_ticks (bool) – Defines the presence of x-y ticks in the figure. If True the ticks will be empty. Default value is False.
  • no_xticks (bool) – Defines the presence of x ticks in the figure. If True the ticks will be empty. Default value is False.
  • no_yticks (bool) – Defines the presence of y ticks in the figure. If True the ticks will be empty. Default value is False.
  • xticks – list of ticks Defines the values of x ticks in the figure. Default value is None.
  • yticks – list of ticks Defines the values of y ticks in the figure. Default value is None.
  • tick_fontsize (int) – Defines the size of the ticks’ font. Default value is 12.
  • xticks_arg (dict) – Defines the arguments that will be passsed into matplotlib as xticks arguments. Default value is None.
  • yticks_arg (dict) – Defines the arguments that will be passsed into matplotlib as yticks arguments. Default value is None.
  • no_limits (bool) – Defines the presence of plot limits in the figure. Default value is False.
  • no_xlim (bool) – Defines the presence of plot x-limits in the figure. Default value is False.
  • no_ylim (bool) – Defines the presence of plot y-limits in the figure. Default value is False.
  • xlim – list of two floats Defines the min and the max values in x-axis. Default in None
  • ylim – list of two floats Defines the min and the max values in y-axis. Default in None
  • no_legend (bool) – Defines the presence of a legend in the figure. If True the legend will not be included in the Figure. Default value is True.
  • legend_arg (dict) – Defines the arguments that will be passsed into matplotlib as legend arguments. Default value is None.
  • prefile (str) – String to include before the general filename of the figure. Default is None.
  • postfile (str) – String to include after the general filename of the figure. Default is None.
  • output_path (str) – String to define the path to the output directory. Default value is ‘./’
  • output_name (str) – String to define the name of the output figure. Default value is ‘Figure’
  • output_format (str) – String to define the format of the output figure. Default value is ‘png’
  • dpi (int) – Define the DPI (Dots per Inch) of the figure. Default value is 300.
  • transparent (bool) – If True the saved figure will have a transparent background. Default value is False.
  • show_plot (bool) – If True the figure is displayed. Default value is True.
  • no_axes (bool) – If True the labels and the frame will be set off. Default value is False.
  • tight (bool) – If True the set layout of matplotlib will be activated. Default value is False.
Returns:

Matplotlib figure, axes