Plots.jl Interact with (pyplot) backend directly to turn off axes

I’m using Plots.jl to draw a 3D plot (with PyPlot backend) and I’d like to turn off the axes. Note that this question is similar to Removing axes in Plots.jl 3D plot, Removing Grid and Plot Manipulation on PyPlot 3D Figures - #3 by Ralph_Smith but those answers are not quite satisfactory.

As established in those questions, grid=false doesn’t turn off the grid for PyPlot. I’d like to turn off both the grid and axis completely, i.e., white background.

Simple example:

using Plots
pyplot()
plot([1.,2.],[1.,2.],[1.,2.],grid=false)

In PyPlot.jl I would just use ax[:set_axis_off]() to interact with matplotlib directly. Is it possible to interact with PyPlot directly from within Plots.jl as well? (which would solve my issue)

I’m using some functionality of Plots.jl in a different part of my package, so I’d like to stay with Plots.jl for this as well instead of switching to PyPlot.jl completely.

1 Like