Skip to content

data plot multiple line : enhancement proposal #16

Description

@HJarausch

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions