Skip to content
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

Plot attribute ordering not adhering to gnuplot syntax #4

Closed
jakobs opened this issue Jul 24, 2010 · 6 comments
Closed

Plot attribute ordering not adhering to gnuplot syntax #4

jakobs opened this issue Jul 24, 2010 · 6 comments

Comments

@jakobs
Copy link

jakobs commented Jul 24, 2010

From the gnuplot manual:
plot {}
{}
{ | {"" {datafile-modifiers}}}
{axes } {} {with <style>}
{, {definitions{,}} ...}

ruby_gnuplot will however put the with attribute into the wrong position, so that when e.g. using the with and smooth attribute at the same time on a dataset fails.

@rdp
Copy link
Owner

rdp commented Jul 26, 2010

so could you give a demo plot, the output it currently sends to gnuplot, and the output you expected it to send?

@jakobs
Copy link
Author

jakobs commented Jul 27, 2010

require 'gnuplot'

File.open("test.gp","w") do |gp|
    Gnuplot::Plot.new( gp ) do |plot|
    plot.data << Gnuplot::DataSet.new( "\"random points\"" ) do |ds|
        ds.title = "smooth frequency" 
        ds.using = "(bin($2,0.05)):(20/300.)"
        ds.smooth = "freq"
        ds.with = "boxes"
    end
    end
end

comes out as
plot "random points" using (bin($2,0.05)):(20/300.) title 'smooth frequency' with boxes smooth freq

and should be
plot "random points" using (bin($2,0.05)):(20/300.) title 'smooth frequency' smooth freq with boxes

which is adapted from the gnuplot smooth demo

@rdp
Copy link
Owner

rdp commented Jul 29, 2010

cool. Looks like I may not get to it till the weekend. Until then patches welcome :)

@rdp
Copy link
Owner

rdp commented Jul 30, 2010

could you try out the freshly pushed 2.3.3 gem for me?

@rdp
Copy link
Owner

rdp commented Jan 30, 2011

anything?

@jakobs
Copy link
Author

jakobs commented Jan 31, 2011

Sorry, yes working for me now. Thanks a lot.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants