File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 155
155
156
156
157
157
###############################################################################
158
- # Now we will use this example to illustrate 3 ways of
158
+ # Now we will use this example to illustrate 2 ways of
159
159
# handling custom colormaps.
160
160
# First, the most direct and explicit:
161
161
170
170
blue_red2 = LinearSegmentedColormap ('BlueRed2' , cdict2 )
171
171
plt .register_cmap (cmap = blue_red2 )
172
172
173
- ###############################################################################
174
- # Third, for LinearSegmentedColormap only,
175
- # leave everything to register_cmap:
176
-
177
- plt .register_cmap (name = 'BlueRed3' , data = cdict3 ) # optional lut kwarg
178
- plt .register_cmap (name = 'BlueRedAlpha' , data = cdict4 )
173
+ plt .register_cmap (cmap = LinearSegmentedColormap ('BlueRed3' , cdict3 ))
174
+ plt .register_cmap (cmap = LinearSegmentedColormap ('BlueRedAlpha' , cdict4 ))
179
175
180
176
###############################################################################
181
177
# Make the figure:
You can’t perform that action at this time.
0 commit comments