making errorbars not clipped in matplotlib with Python -


I am using matplotlib in Python so that a line can be plotted with error extremes:

  plt .barbar (xvalues, up_densities, yerr = ctl_sds, fmt = '- ^', lw = 1.2, markers = markersize, markered color = up_color, color = up_color, label = "my label", clip_on = Folce) plt.xticks (xvalues)  

I have set ticks on the x-axis using "exticks". However, the error bars of the last point in the excavoues (i.e. exquisites [-1]) have been cut on the right - meaning that only half error bar is visible. This is also true with the clip_ on = wrong option

thanks

In the matplotlib, div class = "post-text" itemprop = "text">

In the matplotlib, there is a need for more detailed control through artists, I think that you should do this: /p>

  import matplotlib.pyplot as plct from random import uniform to rx = range (10) e = plt.errorbar (x, [r (2,10) for x] For [i (i) [r.1,1], capsize = 8, color = 'r') in b [1]: b.set_clip_on (false) plt.show ()  < / Pre> 

The problem you have is that the mark To control the code, the clip_on is being used and the error bar is not used to control the error bar, plt.errorbar returns a tubal where the second item There is a list of error bars, so here I go through the list and close the clipping for each error bar.


Comments