How saving multi-graphs
Carlo
during my work with IgorPro, I work with a lot of data and so with a lot of graphs.
Every time I have to save graphs, with "SAVEPICT as __", according to you there is a command, or create a function, that allows me to save all open graphs simultaneously without making one at a time, manually?
If you are not familiar with Igor symbolic paths, execute:
String pathName // Name of Igor symbolic path
String list // List of graph names
// You may need to tweak these parameters
Variable exportType = -5 // See /E for SavePICT
String extension = ".png"
Variable resolution = 576 // 8 x screen resolution
Variable numGraphs = ItemsInList(list)
Variable i
for(i=0; i<numGraphs; i+=1)
String name = StringFromList(i, list)
String fileName = name + extension
SavePICT/O/P=$pathName/E=(exportType)/B=(resolution)/WIN=$name as fileName
endfor
End
May 29, 2016 at 04:35 am - Permalink
WinList("*", ";", "WIN:1")
to create a list with all graphs.May 29, 2016 at 04:56 am - Permalink
Yes. I meant to include this:
String pathName // Name of Igor symbolic path
String list = WinList("*", ";", "WIN:1")
SaveGraphList(pathName, list)
End
May 29, 2016 at 09:39 am - Permalink
I write that procedure and I create a folder in C:\A, than I load 3 graph: Graph0, Graph1, Graph2 (wave0, wave1, wave2).
But when i run
SaveAllGraphs("C:\A")
This error appear: While executing SavePICT, the following error occurred: no symbolic path of that name
May 30, 2016 at 02:59 am - Permalink
May 30, 2016 at 05:02 am - Permalink
I just read the HelpTopic, and:
String pathName // Name of Igor symbolic path
String list = WinList("*", ";", "WIN:1")
SaveGraphList(pathName, list)
End
Function SaveGraphList(pathName, list)
String pathName // Name of Igor symbolic path
String list // List of graph names
// You may need to tweak these parameters
Variable exportType = -8 // See /E for SavePICT
String extension = ".pdf"
Variable resolution = 576 // 8 x screen resolution
Variable numGraphs = ItemsInList(list)
Variable i
for(i=0; i<numGraphs; i+=1)
String name = StringFromList(i, list)
String fileName = name + extension
SavePICT/O/P=$pathName/E=(exportType)/B=(resolution)/WIN=$name as fileName
endfor
End
<pre><code class="language-igor">
when I write in the command line SaveAllGraphs("C:\A:"), appear the error!!!
May 30, 2016 at 05:31 am - Permalink
I just read the HelpTopic, and: when I write in the command line SaveAllGraphs("C:\A:"), appear the error!!!
String pathName // Name of Igor symbolic path
String list = WinList("*", ";", "WIN:1")
SaveGraphList(pathName, list)
End
Function SaveGraphList(pathName, list)
String pathName // Name of Igor symbolic path
String list // List of graph names
// You may need to tweak these parameters
Variable exportType = -8 // See /E for SavePICT
String extension = ".pdf"
Variable resolution = 576 // 8 x screen resolution
Variable numGraphs = ItemsInList(list)
Variable i
for(i=0; i<numGraphs; i+=1)
String name = StringFromList(i, list)
String fileName = name + extension
SavePICT/O/P=$pathName/E=(exportType)/B=(resolution)/WIN=$name as fileName
endfor
End
<pre><code class="language-igor">
[/quote]
May 30, 2016 at 05:31 am - Permalink
It is neither a valid windows folder nor a macintosh path.
For how to get from folders to symbolic paths, please read the help file carefully.
HJ
May 30, 2016 at 06:07 am - Permalink
OK....so, I load my two wave( a general file txt), than display waves ad graph.
Than load that procedure:
saveAllgraphs("C\Users:\Carlo\Save")
May 30, 2016 at 06:28 am - Permalink
May 30, 2016 at 07:14 am - Permalink
So I don't understand!
I now create a NewPath with this command
May 30, 2016 at 07:29 am - Permalink
HJ
May 30, 2016 at 07:32 am - Permalink
Ok ok i just read this and I just create the path!
Now i just try to re-star the pc. thanks
May 30, 2016 at 07:42 am - Permalink
I don't Understand why before not worked!
If i've load 3 graphs, it juts save 3 files with the same graph, not with 3 different files
May 30, 2016 at 08:03 am - Permalink
May 30, 2016 at 08:00 am - Permalink
June 1, 2016 at 02:46 am - Permalink
HJ
June 1, 2016 at 05:43 am - Permalink
That's because of a mistake I made in the SaveGraphList function.
You need to add /WIN=$name to the SavePICT command.
I will fix the original post.
June 1, 2016 at 06:34 am - Permalink
Good! Now it work perfectly ! thanks
June 8, 2016 at 07:23 am - Permalink