How to access minorgrid property and build fine grid by changing line type and color in Julia

Viewed 64

I'm trying to implement a minor grid and I would to do it, as well as change the minorgrid line type and thickness. This is much easier to do in Python, and you can easily call any property with plt.plot. How to implement similar in Julia?

using Plots
f(x) = sqrt(x);
c = 2;
fp = SymPy.diff(f(x), x);       # diff finds derivative, fp an expression (not function)
m = fp(x=>c)            # at c=2
p =plot(f(x), 1, 3, 
    linealpha = 0.5,
    linewidth = 4,
    linecolor = :red,
    xticks = 0:0.4:10, 
    yticks = 0:0.4:10
    )
pp = plot!(f(c) + m * (x - c),
    linewidth = 4,
    linecolor = :blue)
xgrid!(pp, :on, :grey, 1, :dashdot, 0.7)
ygrid!(pp, :on, :grey, 1, :dashdot, 0.7)
0 Answers
Related