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 (Optional[str]): String to include before the general title of the figure. Default value is None.
  • posttitle (Optional[str[) – String to include after the general title of the figure. Default value is None.
  • prefile (Optional[str]) – String to include before the general filename of the figure. Default value is None.
  • postfile (Optional[str]) – String to include after the general filename of the figure. Default value is None.
  • title (Optional[str]) – Set the title for the figure. If “” no title will be added. Default value is “Figure”.
  • title_fontsize (Optional[int]) – Defines the size of the title’s font. Default value is 14.
  • title_arg (Optional[dict]) – Defines the arguments that will be passsed into matplotlib as title arguments. Default value is None.
  • xlabel (Optional[str]) – The xlabel for the figure. For no_xlabel set to ‘’. Default value is “X”.
  • ylabel (Optional[str]) – The xlabel for the figure. For no_ylabel set to ‘’. Default value is “Y”.
  • zlabel (Optional[str]) – The zlabel for the figure. For no_zlabel set to ‘’. Default value is “Z”.
  • label_fontsize (Optional[int]) – Defines the size of the labels’ font. Default value is 14.
  • xlabel_arg (Optional[dict]) – Defines the arguments that will be passsed into matplotlib as xlabel arguments. Default value is None.
  • ylabel_arg (Optional[dict]) – Defines the arguments that will be passsed into matplotlib as ylabel arguments. Default value is None.
  • zlabel_arg (Optional[dict]) – Defines the arguments that will be passsed, into matplotlib as zlabel arguments. Default value is None.
  • xticks (Optional[list of ticks]) – Defines the values of x ticks in the figure. If None the xticks will not be modified. For no_xticks set to []. Default value is None.
  • yticks (Optional[list of ticks]) – Defines the values of y ticks in the figure. If None the yticks will not be modified. For no_yticks set to []. Default value is None.
  • zticks (Optional[list of ticks]) – Defines the values of z ticks in the figure. If None the zticks will not be modified. For no_zticks set to []. Default value is None.
  • tick_fontsize (Optional[int]) – Defines the size of the ticks’ font. Default value is 12.
  • xticks_arg (Optional[dict]) – Defines the arguments that will be passsed into matplotlib as xticks arguments. Default value is None.
  • yticks_arg (Optional[dict]) – Defines the arguments that will be passsed into matplotlib as yticks arguments. Default value is None.
  • zticks_arg (Optional[dict]) – Defines the arguments that will be passsed into matplotlib as zticks arguments. Default value is None.
  • xlim (Optional[list of two floats]) – Defines the min and the max values in x-axis. Default in None
  • ylim (Optional[list of two floats]) – Defines the min and the max values in y-axis. Default in None
  • zlim (Optional[list of two floats]) – Defines the min and the max values in z-axis. Default in None
  • no_legend (Optional[boolean]) – 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 (Optional[dict]) – Defines the arguments that will be passsed into matplotlib as legend arguments. Default value is None.
  • 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.
  • 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 (Optional[str]) – String to define the format of the output figure. Default value is ‘png’
  • dpi (Optional[int]) – Define the DPI (Dots per Inch) of the figure. Default value is 300.
  • transparent (Optional(bool) – If True the saved figure will have a transparent background. Default value is False.
  • aspect_ratio (Optional(str) – Defines the aspect ratio of the figure, according to matplotlib default options. For equal aspect ratio select ‘equal’. For normal aspect ration select ‘auto’. Default value is set to ‘equal’.
Returns:

Matplotlib figure, matplotlib axes