other:python:matplotlib_by_jyp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
other:python:matplotlib_by_jyp [2020/02/11 13:55] – [Starting (and more) with matplotlib] jypeter | other:python:matplotlib_by_jyp [2020/03/31 12:49] – [Misc Matplotlib tricks] Improved jypeter | ||
---|---|---|---|
Line 187: | Line 187: | ||
===== Misc Matplotlib tricks ===== | ===== Misc Matplotlib tricks ===== | ||
- | * Specifying the background color of a plot (e.g. when plotting | + | ==== Specifying the background color of a plot ==== |
- | * '' | + | |
- | | + | e.g. You need to plot a masked variable, but you don't want the masked areas to be white |
+ | |||
+ | < | ||
+ | plt.gca().patch.set_color(' | ||
+ | plt.contourf(d) | ||
+ | plt.show()</ | ||
+ | |||
+ | [[https:// | ||
other/python/matplotlib_by_jyp.txt · Last modified: 2023/10/26 10:39 by jypeter