Examples updated
This commit is contained in:
parent
3e92bbe468
commit
8dcdd13e86
@ -40,9 +40,9 @@ save("parabola.gp") # => save a script file with both data and command to re-cr
|
|||||||
```julia
|
```julia
|
||||||
x = -2pi:0.1:2pi
|
x = -2pi:0.1:2pi
|
||||||
approx = fill(0., length(x));
|
approx = fill(0., length(x));
|
||||||
@gp t="Polynomial approximation of sin(x)" key="opaque"
|
@gp t="Polynomial approximation of sin(x)" key="opaque" linetypes(:Blues_3)
|
||||||
@gp :- "set encoding utf8" raw"""set xtics ('-π' -pi, 'π/2' -pi/2, 0, 'π/2' pi/2, 'π' pi)"""
|
@gp :- "set encoding utf8" raw"""set xtics ('-π' -pi, 'π/2' -pi/2, 0, 'π/2' pi/2, 'π' pi)"""
|
||||||
@gp :- xr=3.8.*[-1, 1] yr=[-1.5,1.5]
|
@gp :- xr=3.8.*[-1, 1] yr=[-1.5,1.5] "set grid"
|
||||||
@gp :- x sin.(x) approx .+= x "w filledcurve t 'n=0' lt 1"
|
@gp :- x sin.(x) approx .+= x "w filledcurve t 'n=0' lt 1"
|
||||||
@gp :- x sin.(x) approx .+= -x.^3/6 "w filledcurve t 'n=1' lt 2"
|
@gp :- x sin.(x) approx .+= -x.^3/6 "w filledcurve t 'n=1' lt 2"
|
||||||
@gp :- x sin.(x) approx .+= x.^5/120 "w filledcurve t 'n=2' lt 3"
|
@gp :- x sin.(x) approx .+= x.^5/120 "w filledcurve t 'n=2' lt 3"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user