visualdatatools.com Forum Index visualdatatools.com
Discussion for DataTank and DataGraph
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Overlay arbitrary number of curves from command line

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started
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)

PostPosted: Sat Nov 10, 2007 1:26 am    Post subject: Overlay arbitrary number of curves from command line Reply with quote

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
View user's profile Send private message
David
Site Admin


Joined: 25 Nov 2006
Posts: 1542
Location: Chapel Hill, NC

PostPosted: Sat Nov 10, 2007 12:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started All times are GMT - 3 Hours
Page 1 of 1

 
Jump to:  
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