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.

This question already has an answer here:

I'm trying to plot a histogram of a few data points and overlay a plot on it (it's a fit of a geometric distribution to my data). The weird thing is that a vertical line appears always next to the smallest datapoint of the histogram. As the distribution is continuous, I always get this vertical line in the middle of the plot, and I'd like to get rid of it.

p[s_] := 1/(1 + s); q[s_] := s/(1 + s);
Geom[s_, x_] := p[s] (q[s]^x);
SigmaC = 9114.738337867104`;
data = {4.566649578817866`, 4.1087341086023645`, 3.5448119117577757`, 4.191562787591725`, 3.7948364578145606`, 4.157517208532611`,    4.539966367996713`, 3.8003045775561977`, 2.60422605308447`,   4.220081924933814`, 4.166548514738755`, 3.879841055986562`,    3.673481697073347`, 3.310480891462675`, 4.680335513414563`};
Hist = Histogram[data, 10, "PDF"];
Pl = Plot[Log[10] 10^s Geom[SigmaC, 10^s], {s, 0, 5}, PlotRange -> {0, 1}, PlotStyle -> {Red, Thick}];    
Show[Hist, Epilog -> First@Pl, PlotRange -> {{0, 5}, {0, 1.5}},  Frame -> True]

enter image description here

When I set

Frame -> False

then the vertical line changes into y-axis. I'd like to have y-axis in the far-left side of the plot. Does anyone have an idea how to resolve this? This is probably really simple but I'd appreciate any insight!

Thanks a lot!

share|improve this question

marked as duplicate by Silvia, Michael E2, rm -rf May 22 '13 at 0:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Have you seen the AxesOrigin option? –  J. M. May 21 '13 at 18:06
    
Try Axes -> False –  Mr.Wizard May 21 '13 at 18:14
    
Similar question. –  Silvia May 21 '13 at 23:50
add comment

1 Answer 1

up vote 3 down vote accepted

Setting the Axes option to either False or None will work.

Show[Hist, Epilog -> First@Pl, PlotRange -> {{0, 5}, {0, 1.5}}, Frame -> True, Axes -> False]

enter image description here

share|improve this answer
    
Thanks a lot Sjoerd, it's exactly what I needed! –  Rafal May 22 '13 at 6:44
add comment

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