When I extract PlotLabel
from my List
of plots using
PlotLabel /. AbsoluteOptions[plotList[[1]], PlotLabel]
I get strings like
"M vs. \!\(\*SubscriptBox[\(n\), \(sync\)]\) - Dutycycle: 20%"
(* or *)
"M vs. Subscript[n, sync] - Dutycycle: 20%"
Now I want to export this list of plots in such a way, that the file-name is related to the PlotLabel
that I extracted before.
How can I make this string suitable for a filename, including:
- replace white-space with
"_"
- make subscript just normal:
Subscript[n, sync]
-->nsync
- remove characters that cannot be in file-names, like
":"
or"%"
?
A result could look like
"M_vs_nsync_-_Dutycycle_20"
StringReplace
may be useful reference.wolfram.com/language/ref/StringReplace.html $\endgroup$