> So, i create an instance of the class like this:
> a=3D Arrow(0,0,5,5,2.0)
> The problem is i don"t know how to draw the arrow on a figure.
=20
You can add the arrow to the Axes with=20
ax.add_artist(arrow)
=20
Is this what you are looking for. The Axes will implicitly assume
the arrow is in data coordinates, unless you set the transform
instance of the arrow edxplicitly. Eg, if you do
arrow.set_transform(ax.transAxes)
where ax is a matplotlib.axes.Axes instance.
> i"m trying to generate the smith chart which is very usefull in
electromagnetic domain.
> In this purpose, i need to draw circle.
> I try to find in the polar function the way circles are drawn but
i didn"t find it.
> Can you told me John how did you draw circles in the polar figure?
=20
You can create an instance of matplotlib.patches.Circle, and add it to
the Axes with ax.add_patch(circ). Same rules about the transform
applies above.
If you want to create a circular Axes, like polar does, you may want
to add the circle instance to the figure. I suggest looking at the
code for matplotlib.axes.PolarAxes, where I create the axes background
"circle" with
self.thetas =3D linspace(0,2*math.pi, self.RESOLUTION)
verts =3D zip(self.thetas, ones(self.RESOLUTION))
self.axesPatch =3D Polygon(
verts,
facecolor=3Dself._axisbg,
edgecolor=3DrcParams['axes.edgecolor'],
)
If you succeed in creating the smith chart, lpease post a patch or an
example, and feel free to ask if you have more questions. I
understand those are tough charts to create.
JDH
