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

data plot multiple line : enhancement proposal #16

Open
HJarausch opened this issue Jan 26, 2021 · 0 comments
Open

data plot multiple line : enhancement proposal #16

HJarausch opened this issue Jan 26, 2021 · 0 comments

Comments

@HJarausch
Copy link

I like to propose an additional plot procedure for plotting multiple data lines

func quote(s:string) : string =
  '"' & s & '"'
....
proc plot*[X, Y](xs: openarray[X],
                 ys: seq[seq[Y]],
                 keys: seq[string]= @[""],
                 styles: seq[Style]= @[]) =

This plots multiple lines ys[i] versus xs.
It produces something like

set title quote(keys[0])
plot "my.data" using 1:2 title quote(keys[1]) with toLowerAscii($styles[0]), "" using 1:3 title quote(keys[2]) 
with toLowerAscii($styles[1]) ...

The existing sendPlot had to be modified to include an additional last parameter
multi:bool=false to skip some processing for plotting multiple lines

gnuplot.nim.patch.txt

nomissbowling added a commit to nomissbowling/gnuplot.nim that referenced this issue Nov 27, 2022
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

1 participant