3

Bug introduced in 10.0.1 or 10.0.2 and fixed in 10.1.0


Take this example plot:

plot = Plot[x, {x, -1, 1}, Frame -> True, FrameLabel -> {"x", "\!\(\*OverscriptBox[\(x\), \(_\)]\)"}]

Mathematica graphics

When I export it to PDF, the overbar in $\bar x$ goes missing.

Export["~/Desktop/test.pdf", plot]

enter image description here

This is with Mathematica version 10.0.2 on OS X and looks like a bug to me. Is there a workaround? All I need for now is a workaround.

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
  • There have been a few Qs like this since V10 came out. The problem typically effects the y axis rendering of fraction boxes, subscript boxes, etc etc It seems to be an important bug that is yet to be fixed. I'm not aware of a workaround but have not searched rigorously. @Jens seems to be the guy to ask for PDF related fixes so he might have a solution. – Mike Honeychurch Feb 23 '15 at 22:28
  • Related (http://mathematica.stackexchange.com/questions/69275/mathematica-cant-export-sqrt/69279#69279) – Basheer Algohi Feb 23 '15 at 23:41
  • Try RotateLabel -> False – Basheer Algohi Feb 23 '15 at 23:42
  • in v10.1.0 OSX the overbar is exported but it seems not well centered on the top of x ... – SquareOne Apr 01 '15 at 21:56

2 Answers2

1

Seems to export well (v10.0.2 OSX) this way :

plot = Plot[x, {x, -1, 1}, Frame -> True, 
  FrameLabel -> {"x", 
    Rasterize[Style[OverBar[Pane@x], 14, FontFamily -> "Helvetica"], 
     RasterSize -> 200]}]
SquareOne
  • 7,575
  • 1
  • 15
  • 34
0

This works fine for me (v. 10.0.0 on Mac), exported. You might want to use the Basic Writing Assistant template for the bar.

Plot[x, {x, -1, 1}, Frame -> True, 
  FrameLabel -> {"x", "\!\(\*OverscriptBox[\(x\), \(_\)]\)"}]

enter image description here

Might a workaround be:

Plot[x, {x, -1, 1}, AxesLabel -> {"x", "\!\(\*OverscriptBox[\(x\), \(_\)]\)"}]
David G. Stork
  • 41,180
  • 3
  • 34
  • 96
  • it is broken in subsequent versions – Mike Honeychurch Feb 23 '15 at 22:55
  • The problem is present in 10.0.2 though and I do not have a 10.0.0 installer around. Also, 10.0.0 has a number of other bugs that affect my work. That said it would of course be possible to use 10.0.0 only for exporting but not actually generating the figures. – Szabolcs Feb 23 '15 at 22:59