I’m working with spectroscopic data where data are visualised as 2D contour plots (just lines, not filled), and it is extremely common to overlay multiple datasets using different colours (e.g. search ‘2D NMR titration’ for lots of examples). I’m trying to create a plot recipe to view this sort of data, but I can’t figure out how to set appropriate colours for the contour lines. I’d like to set up a series of line colours for both positive and negative contours (such as the colorbrewer Paired scheme), so that a typical use case would be:
-
contour(myfirstdataset)
- positive contours will be shown in blue, negative in cyan -
contour!(myseconddataset)
- positive contours will be shown in red, negative in magenta
However, my attempts so far setting :linecolor
or :seriescolor
seem to apply to lines for different levels within the same dataset, and are not cycled across multiple calls as I would like. For example, a MWE (not using recipes):
using Plots
contour(rand(10,10),seriescolor=:Paired)
contour!(rand(10,10),seriescolor=:Paired)
Any advice would be appreciated!