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 

How to reference one of many plots from dgraph command line

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message
jwendt



Joined: 24 Jun 2009
Posts: 11
Location: University of North Carolina - Chapel Hill

PostPosted: Fri Apr 14, 2017 6:09 pm    Post subject: How to reference one of many plots from dgraph command line Reply with quote

I really like the new "many plots/one dataset" feature in 4.2 or 4.3! (It took me a while to upgrade.) I've now created four different plots for a dataset with filters based on global variables. Each plot has a unique name. I'd now like to write a quick bash script that creates each of the four plots for each pairing of the filtering global variables.

However, the help text for dgraph doesn't seem to reference this feature, and I can't find any references to it (wrt dgraph) in the manual or any on-line documentation. Does the dgraph command line support this? If not, how hard would it be to add?

Notes: I'm working on the DataGraph 4.3 Beta distribution.

Thanks
Back to top
View user's profile Send private message
David
Site Admin


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

PostPosted: Sat Apr 15, 2017 1:02 am    Post subject: Reply with quote

What do you want to overwrite using dgraph? One of the global variables? If so, which type of a global variable.

David
Back to top
View user's profile Send private message Send e-mail
jwendt



Joined: 24 Jun 2009
Posts: 11
Location: University of North Carolina - Chapel Hill

PostPosted: Mon Apr 17, 2017 12:36 pm    Post subject: Reply with quote

I want to select which of the four different plots I want written out upon calling dgraph. A quick test showed that at present, if I type:

dgraph -script MyFileWithFourPlots.dgraph -output test.pdf

I get whichever plot was selected when I last saved the dgraph file. What I'm wanting is the ability to select which of the four plots to write out by doing something like:

dgraph NewData.csv -script MyFileWithFourPlots.dgraph -which NamedPlot1 -output NamedOutput1.pdf
dgraph NewData.csv -script MyFileWithFourPlots.dgraph -which NamedPlot2 -output NamedOutput2.pdf
...

Thanks!
Jeremy
Back to top
View user's profile Send private message
jwendt



Joined: 24 Jun 2009
Posts: 11
Location: University of North Carolina - Chapel Hill

PostPosted: Mon Apr 17, 2017 3:51 pm    Post subject: Reply with quote

One more (even better?) idea: Can I make it so that it outputs all four plots from a single call, but with the plot name appended to the output name...

dgraph NewData.csv -script MyFileWithFourPlots.dgraph -output MyNameX.pdf

And "X" gets replaced by the plot's names.
Back to top
View user's profile Send private message
David
Site Admin


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

PostPosted: Tue Apr 18, 2017 1:06 am    Post subject: Reply with quote

I tweaked the dgraph application a little bit.

First, I changed how it checks for a license. I'm transitioning to a new license mechanism - https://www.visualdatatools.com/DataGraph/Register/ and now the dgraph supports that (and only that) license mechanism.

Second, I added a new flag

-flagged directory

which means that it will save all of the flagged graphs into that directory, using the names specified as the graph names. The default is a pdf, but you can overwrite that by using the -format flag, so for example

dgraph NewData.csv MyFileWithFourPlots.dgraph -flagged

will save the four graphs as pdf and

dgraph NewData.csv MyFileWithFourPlots.dgraph -flagged /tmp/Test/ -format pdf,png,svg

will save the four graphs as pdf, png, and svg (total of 12 files) into the directory /tmp/Test/


I uploaded a new beta

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