Given a list of plots, create names for the plots.
For example, create two plots, place them in a list, thread HoldForm to each item in the list, then use the list to create strings for use by Export. The following works, but isn't useful for my application, would like to use a variable which contains the list of plots.
plot01 = Plot[Sin[x], {x, 0, 6}];
plot02 = Plot[Cos[x], {x, 0, 6}];
plotList = {plot01, plot02};
plotListHold = Thread@HoldForm[{plot01, plot02}]
Export[FileNameJoin[{"C:", "Temp", ToString[#] ~~ ".jpg"}],
ReleaseHold[#]] & /@ plotListHold
Some version of the following is what I would like to do. Note that the code attempts to use Map to Apply HoldForm to each item in the variable plotList. The following doesn't work. Have tried various alternatives, but without success.
plot01 = Plot[Sin[x], {x, 0, 6}];
plot02 = Plot[Cos[x], {x, 0, 6}];
plotList = {plot01, plot02};
plotListHold = Map[HoldForm, plotList];
Export[FileNameJoin[{"C:", "Temp", ToString[#] ~~ ".jpg"}],
ReleaseHold[#]] & /@ plotListHold
Some discussion on Stack Exchange Suggestions, perhaps for refactoring the approach, and any discussion of the background about what is gong on would be appreciated.
The overall goal is to define a list of all that plots that have been created in a session, then use the Symbol Names for the plots to create strings to be used by when Exporting the plots.
Attachments: