0
$\begingroup$

I am trying to produce a polar plot. The axis should be in degrees. While no error occurs, the pdf export isn't working properly. Instead of the degree symbol I get a square (while using acrobat) and a 'D' when I use nitro. The code I am using is

r = 2.81794*10^(-15);
m = 511;
a1 = 1/m;
a2 = 5.9/m;
ds1[theta_] := 
 10*r^2*(1/(1 + a1*(1 - Cos[theta])))*((1 + Cos[theta]*Cos[theta])/
  2)*(1 + (a1^2*(1 - Cos[theta])^2)/((1 + 
     Cos[theta]*Cos[theta])*(1 + a1*(1 - Cos[theta]))))
ds2[theta_] := 
 10*r^2*(1/(1 + a2*(1 - Cos[theta])))*((1 + Cos[theta]*Cos[theta])/
2)*(1 + (a2^2*(1 - Cos[theta])^2)/((1 + 
     Cos[theta]*Cos[theta])*(1 + a2*(1 - Cos[theta]))))

Needs["PlotLegends`"]
PolarPlot[{ds1[theta], ds2[theta]}, {theta, -π, π}, PolarAxes -> True, 
  PolarGridLines -> True, PolarTicks -> {"Degrees", Automatic}, 
  PlotRange -> Automatic, 
  PlotLabel -> 
  Style[Framed["Klein-Nishina Compton Cross Section"], 20, Red, 
   Background -> Lighter[Yellow]], 
   PlotLegend -> {"1keV", "5.9keV"}, LegendShadow -> {.01, -.01}, LegendTextSpace -> 5, 
  LegendBackground -> LightPurple, LegendSize -> {0.5, 0.5}, 
   Background -> LightYellow] 

 Export["Klein.pdf", %]

Mathematica graphics

I also tried to export it in other formats, which is working fine, however I need .pdf format...

$\endgroup$
11
  • 1
    $\begingroup$ Please try to post a Minimal working example that displays the behavior you want to show. $\endgroup$ Commented Sep 17, 2012 at 16:21
  • $\begingroup$ You are propably true; that wasn't a minimum...I'll edit the question! $\endgroup$
    – Thanos
    Commented Sep 17, 2012 at 16:23
  • $\begingroup$ @Thanos I get a degree symbol correctly when I export to PDF (Mac OSX 10.8, MMA 8.0.4). It could be because some fonts are missing on your system... $\endgroup$
    – rm -rf
    Commented Sep 17, 2012 at 16:24
  • $\begingroup$ @Thanos I also get a degree symbol when I export to PDF (Win 7 MMA 8.0.4). $\endgroup$ Commented Sep 17, 2012 at 16:26
  • 1
    $\begingroup$ Try to add this option at the end of your PolarPlot: BaseStyle -> {FontFamily -> "Helvetica"} or any other font that is installed on your computer. $\endgroup$
    – VLC
    Commented Sep 17, 2012 at 16:56

1 Answer 1

1
$\begingroup$

Force use of system fonts by the following:

SetOptions[EvaluationNotebook[], 
 PrivateFontOptions -> {"OperatorSubstitution" -> False}]

or

SetOptions[$FrontEnd, 
 PrivateFontOptions -> {"OperatorSubstitution" -> False}]

Note: Options set for $FrontEnd are by default stored in the front end init.m file, and are persistent between front end sessions. (ref. $FrontEnd)

Failing that try another PDF creator.

$\endgroup$
5
  • $\begingroup$ I tried both ways but unfortunately it didn't work... I tried again with nitro reader and adobe acrobat reader nut the issue remains... I also tried with Ocular and Ubuntu's Document Viewer but again no degree symbol... $\endgroup$
    – Thanos
    Commented Sep 19, 2012 at 8:53
  • $\begingroup$ What OS and version of Mathematica are you using? $\endgroup$ Commented Sep 19, 2012 at 9:01
  • $\begingroup$ I am running Mathematica 8.0.0 in Windows Vista. $\endgroup$
    – Thanos
    Commented Sep 19, 2012 at 9:08
  • $\begingroup$ I also tried in FoxIt but again nothing happened... $\endgroup$
    – Thanos
    Commented Sep 20, 2012 at 6:38
  • $\begingroup$ How about CutePDF. Install, then File -> Print, select Printer Name: CutePDF Writer. Very reliable. cutepdf.com/products/cutepdf/writer.asp $\endgroup$ Commented Sep 20, 2012 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.