As the title says, is there a way for a recipe to distinguish whether it was called from
plot!() rather than
For a trivial example, suppose
p = plot(x::MyType) works out limits for axes, and normalises somehow, and that I want
plot!(y) to add a few data points onto that, without changing axis scales, and re-using the same normalisation. Which I’d be happy to save as a global state somewhere, although if it were passed along as
plot!(p, y) that would be nicer.
I believe what I have is called a “type recipe”. And that “user recipes” define new function
myplot(x), which automatically comes with a related
myplot!(x) cousin, so won’t let me do this.