There are a few ways to do that depending on exactly what you want.
From your script, you may just clip your image.
im = imshow(Z, extent=(-1, 1, -1, 1))
im.set_clip_path(Circle((0,0),1, transform=ax.transData))
(Note the use of extent keyword in imshow)
Or,
You can use polar coordinate with p
Hello,
So maybe a couple of images can help.
Using the code
#!/usr/bin/env python
"""
See pcolor_demo2 for a much faster way of generating pcolor plots
"""
from __future__ import division
from pylab import *
def func3(x,y):
return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
def func4(x,y):
th
I'm afraid that I'm still confused and there seems to be not much
thing I can help..
You're considering a circle, but you already have your function in a
cartesian coordinate. I'm not sure why you can't just plot in a
cartesian coordinate? (in other words, what is wrong with your
original script?)
Hello,
I'll try to make myself clear with a simple example: consider a circle
in 2D Cartesian coordinates (x,y) (my domain).
On that circle, for each (x,y) coordinate, you want to plot the function
f(x,y)=x+y
How would you do that in pylab? perhaps I should have called this a
surface plot (as if
On Wed, Apr 1, 2009 at 6:50 AM, Lorenzo Isella wrote:
> Now, I would like to plot exactly the same function but on a circular
> domain (circle of radius 1 centered at (0,0)).
You have an image with x,y spanning from -1 to 1. How do you transform
your x,y coordinate to r, theta? Or, x,y in your ex
Dear All,
I am having a hard time with something which must be fairly doable: I
would like to plot a simple scalar function on a circular domain.
Consider for instance a trivial modification of one of the online examples:
Code 1
#!/usr/bin/env python
"""
See pcolor_demo2 for a much faster way of