fille area under a step function

Hi All

I make a plot of visible satellites at a ground station where calculations
are performed every X minutes (eg 10 minutes). From these calculations I
make a plot which,among other info, displays the number of visible
satellites as a function of time using the drwa-style 'steps-post' (cfr line
below)

   ax2.plot(predDates, nrVisSats, linewidth=3, color='black',
drawstyle='steps-post', label='#Visible', alpha=.6)

I would like to color the area between the time-axis and this line but I
cannot find how to do that for a 'step' function.

Tx for any help.

Alain

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/fille-area-under-a-step-function-tp46991.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

As of mpl 1.5 the fill_between method/function takes a step kwarg
http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.fill_between
which I think will do what you want.

Tom

···

On Fri, Apr 22, 2016, 02:44 amuls <alain.muls at gmail.com> wrote:

Hi All

I make a plot of visible satellites at a ground station where calculations
are performed every X minutes (eg 10 minutes). From these calculations I
make a plot which,among other info, displays the number of visible
satellites as a function of time using the drwa-style 'steps-post' (cfr
line
below)

   ax2.plot(predDates, nrVisSats, linewidth=3, color='black',
drawstyle='steps-post', label='#Visible', alpha=.6)

I would like to color the area between the time-axis and this line but I
cannot find how to do that for a 'step' function.

Tx for any help.

Alain

--
View this message in context:
http://matplotlib.1069221.n5.nabble.com/fille-area-under-a-step-function-tp46991.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
https://mail.python.org/mailman/listinfo/matplotlib-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160425/0afa1b9e/attachment.html>