File: 3d_surface_plot.rb

package info (click to toggle)
ruby-gnuplot 2.6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 224 kB
  • sloc: ruby: 456; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 218 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require "gnuplot"

Gnuplot.open do |gp|
  Gnuplot::SPlot.new( gp ) do |plot|
    plot.grid

    plot.data = [
      Gnuplot::DataSet.new( "x**2+y**2" ) do |ds|
    	ds.with = "pm3d"
      end
    ]
  end
  sleep 10
end