forked from matplotlib/matplotlib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit 71f5cf3
Add new method Colormap.with_alpha() (matplotlib#29525)
We currently do not have a way of adjusting only the transparency of the
mapped colors of the artist, e.g. the fill in contourf(). The
Artist alpha parameter also affects lines and hatches.
The simplest solution is to support creating semi-transparent
colormaps, which can then be used via
`contourf(..., cmap=plt.colormaps['jet'].with_alpha(0.5))`. See also
matplotlib#29044 (comment).
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>1 parent 05a66bb commit 71f5cf3
File tree
4 files changed
+37
-1
lines changed- doc/users/next_whats_new
- lib/matplotlib
- tests
4 files changed
+37
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
943 | 943 |
| |
944 | 944 |
| |
945 | 945 |
| |
946 | + | ||
947 | + | ||
948 | + | ||
949 | + | ||
950 | + | ||
951 | + | ||
952 | + | ||
953 | + | ||
954 | + | ||
955 | + | ||
956 | + | ||
957 | + | ||
958 | + | ||
959 | + | ||
960 | + | ||
961 | + | ||
962 | + | ||
963 | + | ||
964 | + | ||
946 | 965 |
| |
947 | 966 |
| |
948 | 967 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 | + | ||
114 | 115 |
| |
115 | 116 |
| |
116 | 117 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 | - | ||
23 | + | ||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| |||
248 | 248 |
| |
249 | 249 |
| |
250 | 250 |
| |
251 | + | ||
252 | + | ||
253 | + | ||
254 | + | ||
255 | + | ||
256 | + | ||
257 | + | ||
258 | + | ||
259 | + | ||
260 | + | ||
261 | + | ||
251 | 262 |
| |
252 | 263 |
| |
253 | 264 |
| |
|
0 commit comments