----- Forwarded message from Damon McDougall <damon.mcdoug...@gmail.com> -----

> Date: Fri, 10 Aug 2012 12:47:22 +0100
> From: Damon McDougall <damon.mcdoug...@gmail.com>
> To: satish maurya <maurya2278sat...@gmail.com>
> Cc: matplotlib-us...@lists.sourceforge.net
> Subject: Re: [Matplotlib-users] help me Velocity depth plot in matplotlib
> 
> 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

----- End forwarded message -----

I have put in a PR regarding this, since this feature exists in Matlab.
This brings the plotting interface of matplotlib more in line with that
of Matlab. You can view the request at:

https://github.com/matplotlib/matplotlib/pull/1068

Feedback welcome.
Best,
Damon

-- 
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to