Subscribe Bookmark RSS Feed

Save Multiple Graphs At Once

sophiaw

Community Trekker

Joined:

Jul 10, 2015

Hi!

 

I feel like this should be simple, but I must be missing something. I have a bunch of columns and I want to graph all of them in a loop. I set up the loop so it creates all the graphs, I just can't seem to be able to save them... Here is my code so far:

 

wind = {};

For(i = 1, i <= nitems(List) - 4, i++,

       wind = New Window(List,

              Distribution(

                     Stack(1),

                    Continuous Distribution(

                            Column(List),

                            Horizontal Layout(1),

                            Vertical(0),

                            Count Axis(1),

                            Normal Quantile Plot(1)

                     ),

                     SendToReport(

                            Dispatch(

                                   {"Distributions"},

                                   "1",

                                   ScaleBox,

                                   {Min(-0.000151), Max(0.000151), Inc(0.000002), Minor Ticks(1),

                                   Add Ref Line(0.00015, Solid, "Dark Red", "", 1),

                                   Add Ref Line(-0.00015, Solid, "Dark Red", "", 1)}

                            ),

                            Dispatch(

                                   {"Distributions"},

                                   "Distrib Quantile Plot",

                                   FrameBox,

                                   {Frame Size(622, 207)}

                            ),

                            Dispatch(

                                   {"Distributions"},

                                   "Distrib Outlier Box",

                                   FrameBox,

                                   {Frame Size(622, 46)}

                            ),

                            Dispatch(

                                   {"Distributions"},

                                   "Distrib Histogram",

                                   FrameBox,

                                   {Frame Size(622, 504)}

                            )

                     )

              );

       );

       wind << Save Picture("C:\Users\sophia\Documents\test\", PNG);

);

 

 

The bolded line is the one I'm having a problem with. I was hoping that the new windows would save at the path I assigned, but with the name I have already given it and just add the .PNG.

 

Thanks for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I think the filename must be give explicitly. Try this syntax:

wind[i] << Save Picture("C:\Users\sophia\Documents\test\" || test[i] || ".png", "png");

3 REPLIES
Solution

I think the filename must be give explicitly. Try this syntax:

wind[i] << Save Picture("C:\Users\sophia\Documents\test\" || test[i] || ".png", "png");

sophiaw

Community Trekker

Joined:

Jul 10, 2015

I was hoping it was something easy to add. That's perfect! Thank you!

vs90

Community Trekker

Joined:

Jun 16, 2015

Hi,

Instead of appending into list(wind), what you can do is create a V List Box() within a window and append into that box by looping over your Distribution.

I was appending multiple control charts into one window by calling Control Chart function every time.

See this if it helps.....

Empty Control Chart Windows..........Weird Situation.