I have a figure which took some hours to create in Mathematica. I assigned it to a variable myplot
, i.e., myplot = Plot[..]
. Now I want to turn off my computer, even though the legends in this plot are not as good as I wish. I want to be able to change them later.
In Matlab I used to save the figure as a .fig file. Later I was able to open the .fig file and do any manipulation. How is this done in Mathematica? I dont want to spend hours and hours again to create the same figure with better legends, etc. My main concern is to be able to manipulate the legends of the figure without plotting it again with the new legend definitions.
Here is my try without any success:
Show[myplot, PlotLegends -> SwatchLegend[Placed[LineLegend[{Blue, Red, Green, Orange, Black, Cyan}, {"\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \\(0\)]\), \(c\),n]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \\(c\),m]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \\(c\),a]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \\(c\),h]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \\(c\),c]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \\(c\),\(\*SuperscriptBox[\(c\), \(*\)]\)]\)"}, LabelStyle -> 21, LegendFunction -> (Framed[#, RoundingRadius -> 2, FrameStyle -> LightGray] &)], {Left, Top}]]]
Here is the last lines of ctrl-shift+r
Inset[LineLegend[{RGBColor[0, 0, 1], RGBColor[1, 0, 0], RGBColor[0, 1, 0], RGBColor[1, 0.5, 0], GrayLevel[0], RGBColor[0, 1, 1]}, {"\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \(c\),n]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \(c\),m]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \(c\),a]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \(c\),h]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \(c\),c]\)", "\!\(\*SubsuperscriptBox[\(\*SubscriptBox[\(I\), \(0\)]\), \(c\),\(\*SuperscriptBox[\(c\), \(*\)]\)]\)"}, LabelStyle -> 21,
LegendFunction -> (Framed[#1, RoundingRadius -> 2, FrameStyle -> GrayLevel[0.85]] & ), LegendLayout -> "Column"], Scaled[{0.99, 0.99}],
ImageScaled[{1, 1}], BaseStyle -> {FontSize -> Larger}, FormatType -> StandardForm]}, AspectRatio -> 0.7, Axes -> True, AxesLabel -> {Style["t", FontSize -> 21], Style["\!\(\*SubscriptBox[\(I\), \(0\)]\)", FontSize -> 21]}, AxesOrigin -> {0, 0}, AxesStyle -> Arrowheads[0.03], BaseStyle -> 18, GridLines -> Automatic, GridLinesStyle -> GrayLevel[0.85], ImageSize -> {583., Automatic}, Method -> {}, PlotRange -> {{-0.5128185731395787, 0.9326363149439076}, {-0.00003110239778374659, 1.51579064969476}},
PlotRangeClipping -> True, PlotRangePadding -> {Scaled[0.02], Scaled[0.02]}]
DumpSave
would work for you? $\endgroup$Plot[...]
commands with a semicolon;
, the plots will appear in the frontend. This means that they physically reside in the frontend notebook, rather than the kernel, so when you save and quit, the plot will not be lost, and will still be there when you reopen the notebook. $\endgroup$