Magic grid argument

Source code Author Update time

using Plots
gaston()

The grid lines can be modified individually for each axis with the magic grid argument.

x = rand(10)
p1 = plot(x, title = "Default looks")
p2 = plot(x, grid = (:y, :olivedrab, :dot, 1, 0.9), title = "Modified y grid")
p3 = plot(deepcopy(p2), title = "Add x grid")
xgrid!(p3, :on, :cadetblue, 2, :dashdot, 0.4)
plot(p1, p2, p3, layout = (1, 3), label = "", fillrange = 0, fillalpha = 0.3)
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 0.2 0.4 0.6 0.8 2 4 6 8 10 Default looks gnuplot_plot_1a '' 0.2 0.4 0.6 0.8 2 4 6 8 10 Modified y grid gnuplot_plot_1b '' 0.2 0.4 0.6 0.8 2 4 6 8 10 Add x grid gnuplot_plot_1c ''

This page was generated using DemoCards.jl and Literate.jl.