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.

I have a data point that lands right on the Y axis, which corresponds to the index of refraction of some sample. the x axis is the mole fraction of chloroform of my samples.

How do I get the first data point to look sensible (ie, not directly on the axis). I think it looks funny like this.

Needs["ErrorBarPlots`"];
moleFraction[molesA_, molesB_] = molesA/(molesA + molesB);
molesChloroform = {0.125, 0.100, 0.0625, 0.0375, 0};
molesAcetone = {0, 0.027, 0.068, 0.0952, 0.136};
molefrac = moleFraction[molesChloroform, molesAcetone];
calibrationIndexOfRefraction = {1.440, 1.421, 1.395, 1.380, 1.351};
errorBars = {0.1, 0.1, 0.1, 0.1, 0.1};
newList = Partition[Riffle[molefrac, calibrationIndexOfRefraction], 2];
test = Thread[{newList, ErrorBar[errorBars[[1]], 0]}]
ErrorListPlot[test, PlotRange -> {{0, 1.2}, {1.30, 1.45}}, 
 Frame -> True]

My Plot

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Since you are using a Frame you do not need Axes at all. You could use:

ErrorListPlot[test, PlotRange -> {{-0.15, 1.2}, {1.30, 1.45}}, Frame -> True, Axes -> None]

Though longer you could also use PlotRangePadding if you wish not to change PlotRange:

ErrorListPlot[test,
 PlotRange -> {{0, 1.2}, {1.30, 1.45}},
 Frame -> True, Axes -> None, 
 PlotRangePadding -> {{0.15, 0}, {0, 0}}
]

enter image description here

If you actually need axis lines you can use AxesOrigin:

ErrorListPlot[test,
 PlotRange -> {{-0.15, 1.2}, {1.30, 1.45}},
 AxesOrigin -> {-0.15, 1.3}
]

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

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

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