8

I have a bar plot with high resolution. Is it possible to have only the border/frame/top line of the plot like in the following ROOT plot without, i.e. without internal lines?

ROOT plot, empty inside

If I plot with facecolor='none' or 'white', the plot is slashed by both vertical and horizontal lines:

bar plot color none

The only way I can get rid of them is to make edgecolor and facecolor the same, but that's not the look I need...

sagitta
  • 311
  • 2
  • 7
  • 1
    Look for example at http://stackoverflow.com/questions/11297030/matplotlib-stepped-histogram-with-already-binned-data. There are several similar questions already answered on SO – MrCyclophil Mar 03 '16 at 09:58
  • @MyCyclophil Thanks for the answer! I actually finally found it out, the problem was that I was using `plt.bar` instead of `plt.step` thinking that the latter one would be a subtype of the former one. And I was always searching "plot binned data", "histogram remove internal lines", "bar plot only contour" etc. My apologies for making a question solved elsewhere, my solution now is simply `plt.step(xvalues, yvalues)` – sagitta Mar 04 '16 at 11:18
  • No problem. Sometimes it is hard to find the right key words even though you know exactly what you are looking for. – MrCyclophil Mar 04 '16 at 13:16

1 Answers1

13

Found out the answer: the simplest way to achieve the desired look is to use plt.step instead of plt.bar, that simple. Feel shame for asking.

step plot

Mike Müller
  • 77,540
  • 18
  • 155
  • 159
sagitta
  • 311
  • 2
  • 7