- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Saving Graph
I'd like to run JMP from the commandline on a server ---- periodically the data will be dumped from a database and invoke a JMP script --- this script will format the data via Graph Builder --- It all appears to be working but I need a way to save the Graph Image to a file (... PDF would be fine) and close/exit JMP.....
Here is what I have; ----- the graph does not appear and no files created..... --- and I don't know how to close/exit JMP
//Open data table from QA system and create graph for Open Defects by severity and version number//
dt = Open("$SAMPLE_IMPORT_DATA/GalaxyFULL_TEST.xls");
// Build the visualization Graph to show severity of open defects//
wind = New Window( header,
Graph Builder(
.....................Graph Builder script goes here.................................
);
wind << save picture("c:\temp\Graphic.JPG", JPEG);
wind << Close Window;
Close( dt, No Save );
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving Graph
OK --- i've stepped through my script and it appears to be working now ---- not exactly sure where the problem lies..... The following works......
// create a new directory for day of the week//
baseDir = "C:\temp\";
dir = baseDir || Substitute(MDYHMS(Today()), "/", "-", ":", ".");
CreateDirectory(dir);
Set Current Directory (dir);
// save graph to new directory//
wind << save picture("D2L Open Defects.JPG", JPEG);
wind << close Window;
Close( dt, No Save );
Exit (No Save);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving Graph
OK --- i've stepped through my script and it appears to be working now ---- not exactly sure where the problem lies..... The following works......
// create a new directory for day of the week//
baseDir = "C:\temp\";
dir = baseDir || Substitute(MDYHMS(Today()), "/", "-", ":", ".");
CreateDirectory(dir);
Set Current Directory (dir);
// save graph to new directory//
wind << save picture("D2L Open Defects.JPG", JPEG);
wind << close Window;
Close( dt, No Save );
Exit (No Save);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving Graph
Although I have limited experience of Windows, is it possible that the save-error in the first script was caused by the use of a lower case drive letter in the path? As in wind << save picture("c:\temp\Graphic.JPG", JPEG);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving Graph
MS ---- thanks for the suggestion ---- I tried with lower case and uppercase drive letter and it doesn't seem to make a difference...
So I'm still puzzled but at least it's working now.....