Magic grid argument

Source code Author Update time

using Plots
pythonplot()

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)
2024-11-13T18:12:50.460964 image/svg+xml Matplotlib v3.9.1, https://matplotlib.org/

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