I am trying to make an histogram without vertical lines. I'd like to have a plot which looks like a function. Like this:
The same question has been asked for R before ( histogram without vertical lines ) but I'm on Mathematica.
I have been looking into the ChartStyle
options without success.
Here are two methods that work in version 7, using post-processing:
You could also use
ListPlot
withInterpolationOrder->0
:There probably are ways to do this by fiddling with
EdgeForm[]
andFaceForm[]
inHistogram
, but I've found it simpler to roll one on my own, whenever I need it. Here's a very simple and quick example:Doing
histPlot[RandomReal[NormalDistribution[],{1000}],{-3,3,0.1}]
givesYou can then extend this to take any option instead of just
"PDF"
, and for cases when you'd like to choose the bins automatically. I dislike automatic binning, because I like to control my bin widths and extents for predictability and easy comparison against other plots.