|--------| Annotation

Dear all,

first of all thank you for the this awesome plotting library :D.

I have a logarithmic plot where I want to stress out a specific range using

a line like

y Something

-------------------|


/ \

/ \

/

--------------------------->

x

I looked up the documentation but could find a proper arrow style or similar.

Does anybody know how to do this the proper way ?

I did that “manualy” using 3 plot commands and text() , but I guess there should be some nicer way ??

Thanks a lot for help and best wishes,

Paul Hilscher

You can create the arrow with
   a = mpl.patches.FancyArrowPatch(posA=(4,4), posB=(7,4), arrowstyle="|-|")
   ax.add_patch(a)

or

   ax.annotate("", xy=(4,4), xytext=(7,4), arrowprops=dict(arrowstyle='|-|'))

and then adding your label manually with text(), like you said. There
may be some way to do it all in the annotate command (by shifting the
arrow away from the label somehow), but by default the annotate()
command draws an arrow from point xytext to xy (the point you're
labeling).

    Justin

···

On Fri, Oct 28, 2011 at 6:31 AM, Paul Hilscher <pphilscher.ml@...287...> wrote:

Dear all,
first of all thank you for the this awesome plotting library :D.
I have a logarithmic plot where I want to stress out a specific range using
a line like
y Something
> >-------------------|
> ___________
> / \
> / \
>/
>--------------------------->
x
I looked up the documentation but could find a proper arrow style or
similar.
Does anybody know how to do this the proper way ?
I did that "manualy" using 3 plot commands and text() , but I guess there
should be some nicer way ??