Suppose we want to draw the following plot:
DensityPlot[ Sin[ x y], {x, -5, 5}, {y, -5, 5}, MaxRecursion -> 8,
PlotRange -> All,
ColorFunction -> (Hue[Rescale[#, {0, 1}, {.7, 0}]] &),
FrameLabel -> {Style["\!\(\*SubscriptBox[\(x\), \(g\)]\)",
FontSlant -> Italic, FontSize -> 24],
Style["\!\(\*SubscriptBox[\(p\), \(g\)]\)", FontSlant -> Italic,
FontSize -> 24]},
LabelStyle -> {Bold, Black, FontSize -> 16, FontFamily -> Times},
Frame -> True, FrameStyle -> Directive[Black, 18],
BaseStyle -> {FontSize -> 16, FontFamily -> Times},
PlotLegends -> Automatic, PlotTheme -> "Scientific"
]
As you see in the following figure, the labels of the plot are italic, but not the kind we need in scientific papers.
What I need is this:
Is there any way to get this kind of "italic" font? I know that MaTex
may work, but I'm looking for an easier way. I tried installing MaTex
, but never succeeded.
$FontFamilies
to see the fonts available on your system and try one that looks like what you need by replacingFontFamily -> Times
with the new font. For example, on my mac there's a font "Calisto MT" that may fit, viaFontFamily -> "Calisto MT"
$\endgroup$ – egwene sedai Apr 2 '18 at 17:47Subscript[x, g]
instead of the inscrutable"\!\(\*SubscriptBox[\(x\), \(g\)]\)"
. Ifp
is your plot, what doesOptions[p]
return? $\endgroup$ – Carl Woll Apr 2 '18 at 18:24FontFamily -> "Times New Roman"
$\endgroup$ – Bob Hanlon Apr 2 '18 at 20:27