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.4 patchlevel 2 0.2 0.4 0.6 0.8 2 4 6 8 10 gnuplot_plot_1a '' Default looks 0.2 0.4 0.6 0.8 2 4 6 8 10 gnuplot_plot_1b '' Modified y grid 0.2 0.4 0.6 0.8 2 4 6 8 10 gnuplot_plot_1c '' Add x grid

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