-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Axis labels on examples #9
Comments
does the output from running it look off as well? |
I'm on Windows so I ran this code to save the plot:
The resulting plot is here: http://www.cs.umd.edu/~brobbins/tmp/sin_wave.png The Y axis is labeled "x" and X axis labeled "sin(x)". But the plot has sin(x) actually plotted on the Y axis and x on the X axis. This is the typical way of plotting functions in 2D, e.g. https://www.google.com/search?q=plot+of+sin(x) So I think it's just the labels that are swapped in the code. What's crazy is that this example has been around since the older rgplot days (http://rgplot.rubyforge.org/), so I'm skeptical that I'm probably just overlooking something! |
My guess is that the original author wanted to have "sin(x)" at the On Wed, Jan 4, 2012 at 11:16 AM, bryantrobbins
|
ok attempted fix: 34819ac |
It looks to me like the axis labels on your examples are backwards.
For example, from sin_wave.rb
plot.xrange "[-10:10]"
plot.title "Sin Wave Example"
plot.ylabel "x"
plot.xlabel "sin(x)"
Here, x has values -10 to 10, but is labeled "sin(x)". I see the same issue in discrete_points, multiple_data_sets, and output_image_file too.
Am I missing something?
The text was updated successfully, but these errors were encountered: