When changing the label font and saving as a PDF, the saved pdf does not display the changed font style. Here’s an example:
xs = convert(Vector{Float64}, tsteps)
layer2 = layer(x=xs1, y=Euler_Maruyama1,Geom.line,Theme(line_width = 1pt,default_color=colorant"#1E90FF"))
layer4 = layer(x=xs1, y=Milstein1,Geom.point, shape=[Gadfly.Shape.xcross],Theme(line_width = 1pt,default_color=colorant"#006400"))
layer3 = layer(x=xs1, y=GBM1, Geom.line,Theme(line_width = 1pt,default_color=colorant"#FF0000"))
p1 = Gadfly.plot(layer4,layer3,layer2, Guide.xticks(ticks = [0 0.25 0.5 0.75 1]),Theme(grid_line_width=0mm,panel_stroke=color("black"),major_label_font="times-new-roman",minor_label_font="times-new-roman",key_label_font="times-new-roman",key_label_font_size=6pt,major_label_font_size=8pt),Guide.yticks(ticks = [92 97 102 107 112]),Guide.xlabel("Time"), Guide.ylabel("Stock Price"),Guide.manual_color_key("", ["Analytical Solution","Euler-Maruyama Method","Milstein Method"],["#FF0000","#1E90FF","#006400"],pos=[0.05w,-0.45h],shape=[Gadfly.Shape.hline,Gadfly.Shape.hline,Gadfly.Shape.xcross]),Coord.cartesian(xmin=0, xmax=1, ymin=92, ymax=112))
layer5 = layer(x=xs, y=Milstein_Diff, Geom.line,Theme(line_width = 1pt,default_color=colorant"#006400"))
layer1 = layer(x=xs, y=Euler_Maruyama_Diff, Geom.line,Theme(line_width = 1pt,default_color=colorant"#1E90FF"))
p2 = Gadfly.plot(layer1,layer5,Guide.yticks(ticks = [-4.0 -3.0 -2.0 -1.0 0]), Guide.xticks(ticks = [0 0.25 0.5 0.75 1]),Theme(major_label_font="times-new-roman",minor_label_font="times-new-roman",key_label_font="times-new-roman",grid_line_width=0mm,panel_stroke=color("black"),key_label_font_size=6pt,major_label_font_size=8pt),Guide.xlabel("Time"),Guide.ylabel("log₁₀ Absolute Error"),Guide.manual_color_key("", ["Euler-Maruyama Error","Milstein Error"],["#1E90FF","#006400"],pos=[0.05w,-0.45h],shape=[Gadfly.Shape.hline,Gadfly.Shape.hline]))
plt = hstack(p1,p2)
This is how it is displayed with the changed font style in the notebook (which I want):
This is how it is saved, as you can see the font has not been changed:
How do I save it with the changed font?