[Scilab-users] arrows in axis

Samuel Gougeon sgougeon at free.fr
Wed Apr 3 22:21:21 CEST 2019


Hello Federico,

Le 03/04/2019 à 17:42, Federico Miyara a écrit :
>
> Dear all,
>
> Is there any standard way to add an arrow head to axes in a plot?
>
> I have found a function xarrows which allows drawing arrows, so it 
> could be used as a workaround. But what I actually mean is something 
> specific for axes which instead of using a plain line style uses one 
> ended with an arrow head.

There is no dedicated axes property to do that.

You may use xstring() as below.
Bounds and arrows directions to use to set the arrows positions will 
depend on the axes orientation (reverse or not) and position (top/bottom 
| left/right)

Regards
Samuel

clf
plot2d()
ax  =  gca();
ax.box  =  "off";
b  =  ax.data_bounds

xstring(b(1),b(4),"↑")
set(gce(),  "clip_state","off",  "text_box_mode","centered",  "font_size",4)

xstring(b(2),b(3),"→")
set(gce(),  "clip_state","off",  "text_box_mode","centered",  "font_size",4)

Le 03/04/2019 à 17:42, Federico Miyara a écrit :
> Dear all, Is there any standard way to add an arrow head to axes in a 
> plot? I have found a function xarrows which allows drawing arrows, so 
> it could be used as a workaround. But what I actually mean is 
> something specific for axes which instead of using a plain line style 
> uses one ended with an arrow head. Regards, Federico Miyara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190403/46135622/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edpmhiagcafpldpf.png
Type: image/png
Size: 9526 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20190403/46135622/attachment.png>


More information about the users mailing list