Skip to content

Latest commit

 

History

History
137 lines (116 loc) · 2.57 KB

README.md

File metadata and controls

137 lines (116 loc) · 2.57 KB

parametric functions

Original Demo

1

# # Show some of the new parametric capabilities.
# #
# set parametric
# set dummy t
# set autoscale
# set samples 160
# set title ""
# set key box
# set key below
# plot t,sin(t)/t title "t,sin(t)/t or sin(x)/x"

Numo.gnuplot do
  set :parametric
  set dummy:"t"
  set :autoscale
  set samples:160
  set title:""
  set :key, :box
  set :key, "below"
  plot "t",
    ["sin(t)/t", title:"t,sin(t)/t or sin(x)/x"]
end

011param/001

2

# plot sin(t)/t,t

Numo.gnuplot do
  plot "sin(t)/t",
    "t"
end

011param/002

3

# plot sin(t),cos(t)

Numo.gnuplot do
  plot "sin(t)",
    "cos(t)"
end

011param/003

4

# set xrange [-3:3]
# set yrange [-3:3]
# set title "Parametric Conic Sections"
# plot -t,t,cos(t),cos(2*t),2*cos(t),sin(t),-cosh(t),sinh(t)

Numo.gnuplot do
  set xrange:-3..3
  set yrange:-3..3
  set title:"Parametric Conic Sections"
  plot "-t",
    "t",
    "cos(t)",
    "cos(2*t)",
    "2*cos(t)",
    "sin(t)",
    "-cosh(t)",
    "sinh(t)"
end

011param/004

5

# set title ""
#
# set xrange [-5:5]
# set yrange [-5:5]
# plot tan(t),t,t,tan(t)

Numo.gnuplot do
  set title:""
  set xrange:-5..5
  set yrange:-5..5
  plot "tan(t)",
    "t",
    "t",
    "tan(t)"
end

011param/005

6

# set trange [0.00001:3]
# plot t,log(t),-t,log(t),sin(t),t**2,-sin(t),t**2

Numo.gnuplot do
  set trange:0.00001..3
  plot "t",
    "log(t)",
    "-t",
    "log(t)",
    "sin(t)",
    "t**2",
    "-sin(t)",
    "t**2"
end

011param/006

7

# set autoscale x
# set yrange [-1.5:1.5]
# set trange [0.0001:10*pi]
# plot sin(t)/t,cos(t)/t

Numo.gnuplot do
  set autoscale:"x"
  set yrange:-1.5..1.5
  set trange:"[0.0001:10*pi]"
  plot "sin(t)/t",
    "cos(t)/t"
end

011param/007