Skip to content

Commit

Permalink
attempt fix ylabels etc
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp committed Mar 20, 2012
1 parent db81ea6 commit 34819ac
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion examples/3d_surface_plot.rb
Expand Up @@ -10,4 +10,5 @@
end
]
end
end
sleep 10
end
5 changes: 2 additions & 3 deletions examples/discrete_points.rb
Expand Up @@ -4,8 +4,8 @@
Gnuplot::Plot.new( gp ) do |plot|

plot.title "Array Plot Example"
plot.ylabel "x"
plot.xlabel "x^2"
plot.ylabel "x^2"
plot.xlabel "x"

x = (0..50).collect { |v| v.to_f }
y = x.collect { |v| v ** 2 }
Expand All @@ -14,6 +14,5 @@
ds.with = "linespoints"
ds.notitle
end

end
end
4 changes: 2 additions & 2 deletions examples/multiple_data_sets.rb
Expand Up @@ -5,8 +5,8 @@

plot.xrange "[-10:10]"
plot.title "Sin Wave Example"
plot.ylabel "x"
plot.xlabel "sin(x)"
plot.ylabel "sin(x)"
plot.xlabel "x"

x = (0..50).collect { |v| v.to_f }
y = x.collect { |v| v ** 2 }
Expand Down
7 changes: 4 additions & 3 deletions examples/output_image_file.rb
Expand Up @@ -15,13 +15,13 @@
# for a list of recognized terminals.
#
plot.terminal "gif"
plot.output File.expand_path("../sin_wave.gif", __FILE__)
plot.output File.expand_path("../sin_wave.gif", __FILE__)

# see sin_wave.rb
plot.xrange "[-10:10]"
plot.title "Sin Wave Example"
plot.ylabel "x"
plot.xlabel "sin(x)"
plot.ylabel "sin(x)"
plot.xlabel "x"

plot.data << Gnuplot::DataSet.new( "sin(x)" ) do |ds|
ds.with = "lines"
Expand All @@ -30,3 +30,4 @@

end
end
puts 'created sin_wave.gif'
5 changes: 3 additions & 2 deletions examples/sin_wave.rb
Expand Up @@ -5,13 +5,14 @@

plot.xrange "[-10:10]"
plot.title "Sin Wave Example"
plot.ylabel "x"
plot.xlabel "sin(x)"
plot.ylabel "sin(x)"
plot.xlabel "x"

plot.data << Gnuplot::DataSet.new( "sin(x)" ) do |ds|
ds.with = "lines"
ds.linewidth = 4
end

end
sleep 10
end

0 comments on commit 34819ac

Please sign in to comment.