From 4b60b05f757b274cf2a037c5ca8f1fe14dc05bbe Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Thu, 17 Aug 2017 13:42:54 +0200 Subject: [PATCH] update grid defaults and modify grid example --- src/args.jl | 8 ++++---- src/examples.jl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/args.jl b/src/args.jl index 01cafb51..e68e6be6 100644 --- a/src/args.jl +++ b/src/args.jl @@ -175,7 +175,7 @@ function hasgrid(arg::Symbol, letter) if arg in _allGridSyms arg in (:all, :both, :on) || contains(string(arg), string(letter)) else - warn("Unknown grid argument $arg; $letter\grid was set to `true` instead") + warn("Unknown grid argument $arg; $letter\grid was set to `true` instead.") true end end @@ -303,9 +303,9 @@ const _axis_defaults = KW( :mirror => false, :grid => true, :foreground_color_grid => :match, # grid color - :gridalpha => 0.3, - :gridstyle => :dot, - :gridlinewidth => 1, + :gridalpha => 0.1, + :gridstyle => :solid, + :gridlinewidth => 0.5, ) const _suppress_warnings = Set{Symbol}([ diff --git a/src/examples.jl b/src/examples.jl index 640dde92..87ae1ca4 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -321,7 +321,7 @@ PlotExample("Animation with subplots", ), PlotExample("Spy", - "For a matrix `mat` with unique nonzeros `spy(mat)` returns a colorless plot. If `mat` has various different nonzero values, a colorbar is added. The colorbar can be disabled with `legend = nothing`. As always, the marker shape and size can be changed with `spy(mat, markersize = 3, markershape = :star)`", + "For a matrix `mat` with unique nonzeros `spy(mat)` returns a colorless plot. If `mat` has various different nonzero values, a colorbar is added. The colorbar can be disabled with `legend = nothing`. As always, the marker shape and size can be changed with `spy(mat, markersize = 3, markershape = :star)`.", [:(begin a = spdiagm((ones(50), ones(49), ones(49), ones(40), ones(40)),(0, 1, -1, 10, -10)) b = spdiagm((1:50, 1:49, 1:49, 1:40, 1:40),(0, 1, -1, 10, -10)) @@ -330,13 +330,13 @@ PlotExample("Spy", ), PlotExample("Magic grid argument", - "The grid lines can be modified individually for each axis with the magic grid argument", + "The grid lines can be modified individually for each axis with the magic grid argument.", [:(begin x = rand(10) p1 = plot(x, title = "Default looks") - p2 = plot(x, grid = (:y, :olivedrab, :solid, 0.5), title = "Modified y grid") + 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) + xgrid!(p3, :on, :cadetblue, 2, :dashdot, 0.4) plot(p1, p2, p3, layout = (1, 3), label = "", fillrange = 0, fillalpha = 0.3) end)] ),