Automatic adjustment of ticks when zooming with Plots.jl


#1

In Plots.jl using pyplot as the backend, when I zoom in the plot using the pan/zoom button, the axes ticks are not automatically adjusted as PyPlot, nor the x,y coordinates at the bottom left of the plot window are displayed.

Is there a way of obtaining this in Plots.jl?


#2

You might want to try out a different backend. Each one has very different underlying behaviours (Plot.jl tries to achieve the similar outputs only).

Choosing a backend: https://juliaplots.github.io/backends/

Of course, I suggest trying the InspectDR.jl backend:

using Plots
inspectdr() #use InspectDR
#pyplot() #instead of pyplot
plot(1:100,rand(100))

  • InspectDR was designed with interactivity in mind. For example, you can always box-zoom in on plots by using the right mouse button.
  • InspectDR is faster at plotting than PyPlot. It is more noticeable with larger datasets… especially if you draw using only lines (without symbols).

See more on mouse/keybindings: https://github.com/ma-laforge/InspectDR.jl#Bindings

Limitations

InspectDR is mostly limited to 2D plots. Among other things, it does not support:

  • 3D plots
  • Heatmaps