3434
3535
3636def set_rubin_plotstyle () -> None :
37- """
38- Set the matplotlib style for Rubin publications
39- """
37+ """Set the matplotlib style for Rubin publications."""
4038 from matplotlib import style
4139
4240 style .use ("lsst.utils.plotting.rubin" )
@@ -98,16 +96,33 @@ def mk_colormap(colorNames): # type: ignore
9896
9997
10098def divergent_cmap (): # type: ignore
101- """
102- Make a divergent color map.
99+ """Make a divergent color map.
100+
101+ Returns
102+ -------
103+ cmap : `matplotlib.colors.LinearSegmentedColormap`
104+ A colormap stepping from the standard stars color through
105+ gray to the accent color.
103106 """
104107 cmap = mk_colormap ([stars_color (), "#D9DCDE" , accent_color ()])
105108
106109 return cmap
107110
108111
109112def stars_cmap (single_color = False ): # type: ignore
110- """Make a color map for stars."""
113+ """Make a color map for stars.
114+
115+ Parameters
116+ ----------
117+ single_color : `bool`, optional
118+ If `True` use the standard stars color.
119+
120+ Returns
121+ -------
122+ cmap : `matplotlib.colors.Colormap`
123+ A colormap derived from the standard stars color if
124+ ``single_color`` is `True`, otherwise the seaborn "mako" palette.
125+ """
111126 import seaborn as sns
112127 from matplotlib .colors import ListedColormap
113128
@@ -119,20 +134,35 @@ def stars_cmap(single_color=False): # type: ignore
119134
120135
121136def stars_color () -> str :
122- """Return the star color string for lines"""
137+ """Return the star color string for lines. """
123138 return "#084d96"
124139
125140
126141def accent_color () -> str :
127- """Return a contrasting color for overplotting,
128- black is the best for this but if you need two colors
142+ """Return a contrasting color for overplotting.
143+
144+ Notes
145+ -----
146+ Black is the best for this but if you need two colors
129147 this works well on blue.
130148 """
131149 return "#DE8F05"
132150
133151
134- def galaxies_cmap (single_color = False ): # type: ignore
135- """Make a color map for galaxies."""
152+ def galaxies_cmap (single_color : bool = False ): # type: ignore
153+ """Make a color map for galaxies.
154+
155+ Parameters
156+ ----------
157+ single_color : `bool`, optional
158+ If `True` use the standard galaxies color.
159+
160+ Returns
161+ -------
162+ cmap : `matplotlib.colors.LinearSegmentedColormap` or `str`
163+ A colormap derived from the standard galaxies color if
164+ ``single_color`` is `True`, otherwise the colormap name "inferno".
165+ """
136166 if single_color :
137167 cmap = mk_colormap ([galaxies_color ()])
138168 else :
@@ -141,17 +171,29 @@ def galaxies_cmap(single_color=False): # type: ignore
141171
142172
143173def galaxies_color () -> str :
144- """Return the galaxy color string for lines"""
174+ """Return the galaxy color string for lines. """
145175 return "#961A45"
146176
147177
148178def sso_color () -> str :
149- """Return the SSO color string for lines"""
179+ """Return the SSO color string for lines. """
150180 return "#01694c"
151181
152182
153- def sso_cmap (single_color = False ): # type: ignore
154- """Make a color map for solar system objects."""
183+ def sso_cmap (single_color : bool = False ): # type: ignore
184+ """Make a color map for solar system objects.
185+
186+ Parameters
187+ ----------
188+ single_color : `bool`, optional
189+ If `True` use the standard SSO color.
190+
191+ Returns
192+ -------
193+ cmap : `matplotlib.colors.LinearSegmentedColormap` or `str`
194+ A colormap derived from the standard SSO color if
195+ ``single_color`` is `True`, otherwise the colormap name "viridis".
196+ """
155197 if single_color :
156198 cmap = mk_colormap ([sso_color ()])
157199 else :
@@ -160,16 +202,19 @@ def sso_cmap(single_color=False): # type: ignore
160202
161203
162204def get_band_dicts () -> dict :
163- """
164- Define palettes, from RTN-045. This includes dicts for colors (bandpass
165- colors for white background), colors_black (bandpass colors for
166- black background), plot symbols, and line_styles, keyed on band (ugrizy).
205+ """Define palettes, from RTN-045.
167206
168207 Returns
169208 -------
170209 band_dict : `dict` of `dict`
171210 Dicts of colors, colors_black, symbols, and line_styles,
172211 keyed on bands 'u', 'g', 'r', 'i', 'z', and 'y'.
212+
213+ Notes
214+ -----
215+ This includes dicts for colors (bandpass colors for white background),
216+ colors_black (bandpass colors for black background), plot symbols, and
217+ line_styles, keyed on band (ugrizy).
173218 """
174219 colors = get_multiband_plot_colors ()
175220 colors_black = get_multiband_plot_colors (dark_background = True )
0 commit comments