I’m trying to change an axis position. For example make the xaxis at y=0 instead of y=-3 here
I tried the documentation for Plots but I didn’t find a possible option in axis attributes
maybe you want
plot(f, 0, 5, xlabel = "x", ylabel = "y", framestyle = :zerolines)?
This is good but what I really want is to control the position of the axis not nesccarilly keep it at y=0.
There is no way to do this rather than modifying the backend plot object after the fact or use the
etra_kwargs mechanism, thats currently only implemented for the
What about this:
plot(f, 0, 5, xlabel = "x", ylabel = "y", ylims=(0,Inf), xlims=(3,Inf), legend=:topleft)
But that didn’t shift the x-axis, it is still at y=0
For example make the xaxis at y=0
Hmmm, I suppose I don’t understand what the goal is then. Can you post an example of an output you’re trying to achieve?
I used AxisOrigin in Mathemtica to position the x-axis at y=3 and this is the output
I see. A quick (and dirty) way would be to just cheat by manually specifying the tick labels, like this:
f, 0, 5,
yticks=(-3:3, ["$i" for i in 0:6])
I find that a pretty confusing graph…