Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Here is my code:

ClearAll["Global`*"]

f = OpenRead["****"]
data1 = ReadList[f, {Number, Number}]
a = BarChart[Last[#] & /@ data1, ChartLabels -> (First[#] & /@ data1),
TicksStyle -> {Directive[0.1
 , Opacity[0], FontOpacity -> 1], 
Directive[12, Opacity[1], FontOpacity -> 1]},
BarSpacing -> Large, PlotRange -> {0, 2}, ImagePadding -> 10]
g = OpenRead["****"]
data1 = ReadList[g, {Number, Number}]
b = BarChart[Last[#] & /@ data1, ChartLabels -> (First[#] & /@ data1),
TicksStyle -> {Directive[0.1
 , Opacity[0], FontOpacity -> 1], 
Directive[12, Opacity[1], FontOpacity -> 1]},
BarSpacing -> Large, PlotRange -> {0, 2}, ImagePadding -> 10]
h = OpenRead["****"]
data1 = ReadList[h, {Number, Number}]
c = BarChart[Last[#] & /@ data1, ChartLabels -> (First[#] & /@ data1),
TicksStyle -> {Directive[0.1
 , Opacity[0], FontOpacity -> 1], 
Directive[12, Opacity[1], FontOpacity -> 1]},
BarSpacing -> Large, PlotRange -> {0, 2}, ImagePadding -> 10]

Fig = GraphicsRow[{a, b, c}, ImageSize -> 1000]
Export["*****", Fig]

Here is Fig: My fig Here is what comes out of Export: enter image description here

You might not be able to see it so clearly, but the 5 in the x-axis is out of alignment with the other numbers, and under magnification looks odd (Zoom in!!!). This is true of the image after Mathematica exports it as a .pdf.

1) Why?

2) How can I avoid this?

share|improve this question
    
Please include your data in the code so that people can test this for themselves. You could also try to narrow the problem down - does it occur for a single bar chart or only when you have three in a GraphicsRow? Which options do or don't affect it? Try to reduce the code to the bare minimum required to demonstrate the issue, this will make the question more appealing to potential answerers. –  Simon Woods Apr 18 at 9:48
    
I can't reproduce it this way ImportString[ExportString[BarChart[Range[10]/6, ChartLabels -> Range[10], TicksStyle -> {Directive[0.1, Opacity[0], FontOpacity -> 1], Directive[12, Opacity[1], FontOpacity -> 1]}, BarSpacing -> Large, PlotRange -> {0, 2}, ImagePadding -> 10], "PDF"], "PDF"][[1]] –  Sjoerd C. de Vries Apr 18 at 13:20
    
Use 14 tuples for the data, where the mantissa progresses 0 to 13, and the ordinate ranges between 0 and 2. i.e.: 0 0.5 1 0 2 0 3 1.4 4 2 5 0.3 6 0.7 7 1.3 8 0 9 1.8 10 1.8 11 0 12 2 13 0.4 –  Rentsy Apr 18 at 14:53
    
Yes, this happens when I use Export on a single graphic, i.e. Export["MyDistribution.pdf", a] –  Rentsy Apr 18 at 15:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.