logo

How to Neatly Print without Axes, Scales, etc. in Julia 📂Julia

How to Neatly Print without Axes, Scales, etc. in Julia

Code

Plots.jl essentially outputs everything including grids, ticks, axes, and color bars by default, but if you want to make it clean without these, you can add the following options.

  • colorbar=:none: Removes the color bar.
  • showaxis = false: Removes the axes and ticks.
  • grid=false: Removes the background grid.
  • ticks=false: Removes both background grid and ticks.
  • framestyle=:none: Removes both background grid and axes.
using Plots

surface(L, title="default")
surface(L, title="colorbar=:none", colorbar=:none)
surface(L, title="showaxis=false", showaxis=false)
surface(L, title="grid=false", grid=false)
surface(L, title="ticks=false", ticks=false)
surface(L, title="framestyle=:none", framestyle=:none)
surface(L, title="all off", ticks=false, framestyle=:none, colorbar=:none)

fig1.png

fig2.png

fig3.png

fig4.png

fig5.png

fig6.png

fig7.png

Environment

  • OS: Windows11
  • Version: Julia v1.8.3, Plots v1.38.6