 |
visualdatatools.com Discussion for DataTank and DataGraph
|
| View previous topic :: View next topic |
| Author |
Message |
kevingross
Joined: 04 Dec 2006 Posts: 6 Location: Air Force Institute of Technology (Wright-Patterson AFB, Ohio)
|
Posted: Sat Nov 10, 2007 1:26 am Post subject: Overlay arbitrary number of curves from command line |
|
|
Hi,
Suppose I have a CSV file containing the following columns: X,Y1,Y2,...,YN. Here, N may vary and be somewhat large, say between 20-50. Is it possible to plot X vs Y1, X vs Y2, ... X vs YN on top of each other from the command line (dgraph)? (By default, it only shows X vs Y1.) And if I wanted all the curves to be identically formatted in some non-default way, how could I easily accomplish this?
Thanks,
Kevin |
|
| Back to top |
|
 |
David Site Admin
Joined: 25 Nov 2006 Posts: 1542 Location: Chapel Hill, NC
|
Posted: Sat Nov 10, 2007 12:10 pm Post subject: |
|
|
The first step is to create the template script, let's say it is called
/tmp/template.dplot
Then you run it on the file with
dgraph -Scdript /tmp/template.dgraph textfilename -output out.pdf
To create template.dplot with 51 columns and ready to draw 50 lines on top of each other, there is a shortcut (well, it requires 101 clicks, but it is quick).
Create 49 additional number columns, by clicking 49 times on the "3" icon below the data table.
Now, select all the columns (click on one, then command-A to select the rest), command-click on the y column, so now the 1st, 3rd,4th,5th,...,51st columns are selected. Now click 49 times on the plot icon in the toolbar.
The rule is that if you have columns selected, and click on the plot or scatter icon, the first two selected columns are used, and then the second selected column is deselected. So select three columns and hit the scatter twice and you draw x-y1 and x-y2.
David |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|