Re: [Matplotlib-users] Arrow with a dashed line

2012-03-26 Thread Jae-Joon Lee
Just to clarify, both arrowstyle='simple' and arrowstyle='-|>' draw
arrows as patches. In your first example with arrowstyle='simple', the
arrow is drawn as filled patch without edges, i.e., linestyle is not
effective. arrowstyle="-|>" also uses a patch but no "fill", only
"stroke".

Regards,

-JJ

On Tue, Mar 13, 2012 at 3:28 AM, Tony Yu  wrote:
> Nevermind: I though arrowstyle='simple' and arrowstyle='-|>' were the same
> thing, but apparently not (I guess one draws the line as a patch, and the
> other as a line). So the following works as expected:

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Arrow with a dashed line

2012-03-12 Thread Tony Yu
On Sun, Mar 11, 2012 at 2:13 PM, Tony Yu  wrote:

> Is it possible to draw an arrow with a dashed line?
>
> I tried using a fancy arrow patch and set the linestyle:
>
> #~~~
> import matplotlib.pyplot as plt
>
> fix, ax = plt.subplots()
> ax.set_xlim((-1,5))
> ax.set_ylim((-5,3))
>
> ax.annotate('simple', xy=(2., -1),  xycoords='data',
> xytext=(100, 60), textcoords='offset points',
> size=20,
> arrowprops=dict(arrowstyle="simple",
> fc="0.6", ec="none", linestyle='dashed',
> connectionstyle="arc3,rad=0.3"),
> )
> plt.show()
> #~~~
>
> But the linestyle argument just gets ignored.
>
> Is there a way to grab the connection path object and then change that to
> a dashed line? Actually, I'm not even sure it's possible to set a linestyle
> for a Path (since dashed lines are normally Line2D). Suggestions?
>
> Thanks,
> -Tony
>


Nevermind: I though arrowstyle='simple' and arrowstyle='-|>' were the same
thing, but apparently not (I guess one draws the line as a patch, and the
other as a line). So the following works as expected:

#
import matplotlib.pyplot as plt

fix, ax = plt.subplots()
ax.set_xlim((-1,5))
ax.set_ylim((-5,3))

ax.annotate('simple', xy=(2., -1),  xycoords='data',
xytext=(100, 60), textcoords='offset points',
size=20,
arrowprops=dict(arrowstyle="-|>",
fc="k", ec="k", linestyle='dashed',
connectionstyle="arc3,rad=0.3"),
)
plt.show()
#~~~
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Arrow with a dashed line

2012-03-11 Thread Tony Yu
Is it possible to draw an arrow with a dashed line?

I tried using a fancy arrow patch and set the linestyle:

#~~~
import matplotlib.pyplot as plt

fix, ax = plt.subplots()
ax.set_xlim((-1,5))
ax.set_ylim((-5,3))

ax.annotate('simple', xy=(2., -1),  xycoords='data',
xytext=(100, 60), textcoords='offset points',
size=20,
arrowprops=dict(arrowstyle="simple",
fc="0.6", ec="none", linestyle='dashed',
connectionstyle="arc3,rad=0.3"),
)
plt.show()
#~~~

But the linestyle argument just gets ignored.

Is there a way to grab the connection path object and then change that to a
dashed line? Actually, I'm not even sure it's possible to set a linestyle
for a Path (since dashed lines are normally Line2D). Suggestions?

Thanks,
-Tony
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users