I'm creating a lot of graphics, which I save in PDF format for later use in LaTeX. I have currently two issues.
When I create a graphic and then export it to PDF, a white space appears on the side of the graphic. After some head knocking, I figured out it is because of the legend that I use. Apparently, though I have specified legend placement on the upper-right corner of the plot, the PostScript printer still interprets
Legended
as if the legend was placed on the side of the graph and accounts for the space appropriately. Is there any way to work around this?How do I specify fonts to be used for axes labels and legend entries in 'printout' environment. When I plot graphics in working environment, the fonts used are Helvetica. However, when I export them in the Printout environment (default export environment) it always uses some Mathematica Sans font which Adobe Illustrator does not recognize. (OK, now we can discuss how Adobe Illustrator is unable to render an embedded font, but that is another issue).
Any feedback is appreciated.
P.S. It is not an option to use some other environment for exporting because doing so creates a chain of other issues with proper rendering of figures.
Edit: Below is example of the failed export. What can not be seen is that fonts used for legend and frame tick labels are wolfram proprietary. I added a frame so the image borders are easier to see.
And for those interested, here is the code used to produce the image.
frame[legend_] := Framed[legend, FrameStyle -> Directive[Black, Thin], FrameMargins -> 0, Background -> White]
a = {{0, -\[Omega]^2}, {1, 0}};
b = {{g \[Omega]}, {0}};
c = {{1, 0}, {0, 1}};
d = {{0}, {0}};
StateSpaceModel[{a, b, c, d}]
SystemsModelFeedbackConnect[%, {1, 1}]
TransferFunctionModel[%, s]
BodePlot[% /. {g -> 0.1, \[Omega] -> 1}, {0.1, 10}, GridLines -> Automatic, ImageSize -> Medium, PlotLabel -> {"Amplitude Plot", "Phase Plot [degrees]"}, FrameLabel -> {{None, None}, {"\[Omega] [rad]", None}}, PlotStyle -> Thin, PlotLegends -> Placed[LineLegend[{"\!\(\*SubscriptBox[\(H\), \(1\)]\)(s)", "\!\(\*SubscriptBox[\(H\), \(2\)]\)(s)"}, LegendFunction -> frame], {0.97, 0.95}]]
Export["bodeplot.pdf", %]