|
43 | 43 | Passed to :meth:`~matplotlib.axes.Axes.quiver`\ |
44 | 44 | """ |
45 | 45 |
|
| 46 | +doc_cm_palette = """\ |
| 47 | +color_map |
| 48 | + Color map to use for continous variables. Can be a name or a |
| 49 | + :class:`~matplotlib.colors.Colormap` instance (e.g. `"magma`", `"viridis"` |
| 50 | + or `mpl.cm.cividis`), see :func:`~matplotlib.pyplot.get_cmap`. |
| 51 | + If `None`, the value of `mpl.rcParams["image.cmap"]` is used. |
| 52 | + The default `color_map` can be set using :func:`~scanpy.set_figure_params`. |
| 53 | +palette |
| 54 | + Colors to use for plotting categorical annotation groups. |
| 55 | + The palette can be a valid :class:`~matplotlib.colors.ListedColormap` name |
| 56 | + (`'Set2'`, `'tab20'`, …), a :class:`~cycler.Cycler` object, a dict mapping |
| 57 | + categories to colors, or a sequence of colors. Colors must be valid to |
| 58 | + matplotlib. (see :func:`~matplotlib.colors.is_color_like`). |
| 59 | + If `None`, `mpl.rcParams["axes.prop_cycle"]` is used unless the categorical |
| 60 | + variable already has colors stored in `adata.uns["{var}_colors"]`. |
| 61 | + If provided, values of `adata.uns["{var}_colors"]` will be set.\ |
| 62 | +""" |
| 63 | + |
46 | 64 | # Docs for pl.scatter |
47 | | -doc_scatter_basic = """\ |
| 65 | +doc_scatter_basic = f"""\ |
48 | 66 | sort_order |
49 | 67 | For continuous annotations used as color parameter, plot data points |
50 | 68 | with higher values on top of others. |
|
81 | 99 | Point size. If `None`, is automatically computed as 120000 / n_cells. |
82 | 100 | Can be a sequence containing the size for each cell. The order should be |
83 | 101 | the same as in adata.obs. |
84 | | -color_map |
85 | | - Color map to use for continous variables. Can be a name or a |
86 | | - :class:`~matplotlib.colors.Colormap` instance (e.g. `"magma`", `"viridis"` |
87 | | - or `mpl.cm.cividis`), see :func:`~matplotlib.pyplot.get_cmap`. |
88 | | - If `None`, the value of `mpl.rcParams["image.cmap"]` is used. |
89 | | - The default `color_map` can be set using :func:`~scanpy.set_figure_params`. |
90 | | -palette |
91 | | - Colors to use for plotting categorical annotation groups. |
92 | | - The palette can be a valid :class:`~matplotlib.colors.ListedColormap` name |
93 | | - (`'Set2'`, `'tab20'`, …), a :class:`~cycler.Cycler` object, a dict mapping |
94 | | - categories to colors, or a sequence of colors. Colors must be valid to |
95 | | - matplotlib. (see :func:`~matplotlib.colors.is_color_like`). |
96 | | - If `None`, `mpl.rcParams["axes.prop_cycle"]` is used unless the categorical |
97 | | - variable already has colors stored in `adata.uns["{var}_colors"]`. |
98 | | - If provided, values of `adata.uns["{var}_colors"]` will be set. |
| 102 | +{doc_cm_palette} |
99 | 103 | na_color |
100 | 104 | Color to use for null or masked values. Can be anything matplotlib accepts as a |
101 | 105 | color. Used for all points if `color=None`. |
|
179 | 183 | for instance: the maximum and minimum values (e.g. `vmin=-2, vmax=5`).\ |
180 | 184 | """ |
181 | 185 |
|
182 | | -doc_show_save_ax = """\ |
| 186 | +doc_show_save = """\ |
183 | 187 | show |
184 | 188 | Show the plot, do not return axis. |
185 | 189 | save |
186 | 190 | If `True` or a `str`, save the figure. |
187 | 191 | A string is appended to the default filename. |
188 | | - Infer the filetype if ending on {`'.pdf'`, `'.png'`, `'.svg'`}. |
| 192 | + Infer the filetype if ending on {`'.pdf'`, `'.png'`, `'.svg'`}.\ |
| 193 | +""" |
| 194 | + |
| 195 | +doc_show_save_ax = f"""\ |
| 196 | +{doc_show_save} |
189 | 197 | ax |
190 | 198 | A matplotlib axes object. Only works if plotting a single component.\ |
191 | 199 | """ |
|
0 commit comments