On Fri, Aug 10, 2012 at 02:09:39PM +0530, satish maurya wrote:
> Dear All,
> 
> I want to stairs plot (similar in matlab) matplotlib
> First i want for i data-set then multiple data-set super impose on that.
> I attach the figure it's showing velocity-depth stairs plots for
> superimpose (like hold on in matlab)
> large data-set.
> can anybody tell me how to plot that.
>

I'm not sure I understand what you're asking. Are you asking how to make
a stairplot, or are you asking how to make *multiple* plots on one set
of axes?

If your question is the former, matplotlib does not currently have a
stairplot implementation, but it wouldn't be hard to use the usual
plot() function to achieve the desired effect:

Before:

x = arange(0, 10, 1)
y = x * (10.0 - x)
plot(x, y)

After:

x = arange(0, 10, 1)
x_m = x - 0.5 # left-hand midpoints
x_p = x + 0.5 # right-hand midpoints
y = x * (10.0 - x)
x_all = dstack((x_m, x, x_p)).flatten()
y_all = dstack((y, y, y)).flatten()
plot(x_all, y_all)

If your question is the latter, you can toggle the hold state just by
calling

hold()

Hope this helps.

> 
> see the figure
> 
> Thank you
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> *Satish Maurya*
> *Research Scholar*
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
Damon McDougall
http://damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to