[Matplotlib-users] View just an angled part of an axis?

2014-03-07 Thread Jody Klymak

Hi all,

I have some pcolormesh data that is in a thin strip along a slope at a (say) 45 
degree angle.Is there a way to set up a view of data just within dz of the 
slope, following the slope?  I would then stack successive views of this data.  

I tentatively tried something like:

pcm=pcolormesh(x,z,Ep,rasterized=True,cmap=jet,vmin=-13,vmax=-5)
rect = Rectangle((1,-8),10,4, facecolor="none", edgecolor="k",angle=-45)
gca().add_artist(rect)
pcm.set_clip_path(rect) 

But that doesn't clip properly.  

Note, I don't really want to rotate the data (that would be easy enough).  I'd 
still prefer there was the sense of a slope relative to the horizontal.  

Thanks for any thoughts...

Cheers,   Jody
--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Clip or skip lines going over border of canvas

2014-03-07 Thread Eric Firing
On 2014/03/06 10:43 PM, svebert wrote:
> Hi!
>
> I plot measurment data and connect them with lines (style eg. "-*r"). Points
> which are outside of the ylimits are still connected with points which are
> inside of the ylimits. Is there any way to tell matplot to only connect two
> points if both are inside the y/x-limits?
> Because now i get weird lines crossing the whole canvas if some points
> spread to much from the mean data.
>
> Removing points before plotting is not an option because then points are
> connected which are not in consecutive order. Matplotlib should just skip a
> connecting line when one of the two points lies without the canvas/limits.

It sounds like what you need to do is either use a masked array and mask 
out the points that are outside the limits, or use NaNs for that purpose.

Eric

>
> Is there any simple way/option to do tha?
>
> Thanks in advance,
> Sven
>
>
>
> --
> View this message in context: 
> http://matplotlib.1069221.n5.nabble.com/Clip-or-skip-lines-going-over-border-of-canvas-tp43015.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
> --
> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works.
> Faster operations. Version large binaries.  Built-in WAN optimization and the
> freedom to use Git, Perforce or both. Make the move to Perforce.
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>


--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Clip or skip lines going over border of canvas

2014-03-07 Thread svebert
Hi!

I plot measurment data and connect them with lines (style eg. "-*r"). Points
which are outside of the ylimits are still connected with points which are
inside of the ylimits. Is there any way to tell matplot to only connect two
points if both are inside the y/x-limits?
Because now i get weird lines crossing the whole canvas if some points
spread to much from the mean data.

Removing points before plotting is not an option because then points are
connected which are not in consecutive order. Matplotlib should just skip a
connecting line when one of the two points lies without the canvas/limits.

Is there any simple way/option to do tha?

Thanks in advance,
Sven 



--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/Clip-or-skip-lines-going-over-border-of-canvas-tp43015.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

--
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users