scanpy.set_figure_params
- scanpy.set_figure_params(scanpy=True, dpi=80, dpi_save=150, frameon=True, vector_friendly=True, fontsize=14, figsize=None, color_map=None, format='pdf', facecolor=None, transparent=False, ipython_format='png2x')
Set resolution/size, styling and format of figures.
- Parameters
- scanpy :
bool
bool
(default:True
) Init default values for
matplotlib.rcParams
suited for Scanpy.- dpi :
int
int
(default:80
) Resolution of rendered figures – this influences the size of figures in notebooks.
- dpi_save :
int
int
(default:150
) Resolution of saved figures. This should typically be higher to achieve publication quality.
- frameon :
bool
bool
(default:True
) Add frames and axes labels to scatter plots.
- vector_friendly :
bool
bool
(default:True
) Plot scatter plots using
png
backend even when exporting aspdf
orsvg
.- fontsize :
int
int
(default:14
) Set the fontsize for several
rcParams
entries. Ignored ifscanpy=False
.- figsize :
int
|None
Optional
[int
] (default:None
) Set plt.rcParams[‘figure.figsize’].
- color_map :
str
|None
Optional
[str
] (default:None
) Convenience method for setting the default color map. Ignored if
scanpy=False
.- format : {‘png’, ‘jpg’, ‘tif’, ‘tiff’, ‘pdf’, ‘ps’, ‘eps’, ‘svg’, ‘svgz’, ‘pgf’, ‘raw’, ‘rgba’}
Literal
[‘png’, ‘jpg’, ‘tif’, ‘tiff’, ‘pdf’, ‘ps’, ‘eps’, ‘svg’, ‘svgz’, ‘pgf’, ‘raw’, ‘rgba’] (default:'pdf'
) This sets the default format for saving figures:
file_format_figs
.- facecolor :
str
|None
Optional
[str
] (default:None
) Sets backgrounds via
rcParams['figure.facecolor'] = facecolor
andrcParams['axes.facecolor'] = facecolor
.- transparent :
bool
bool
(default:False
) Save figures with transparent back ground. Sets
rcParams['savefig.transparent']
.- ipython_format :
str
str
(default:'png2x'
) Only concerns the notebook/IPython environment; see
set_matplotlib_formats()
for details.
- scanpy :