bugGNU Octave - Bugs: bug #58386, function request: drawaxis


bug #58386: function request: drawaxis

Submitted by:  Leonardo <pocker>
Submitted on:  Sun 17 May 2020 09:49:52 PM UTC  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  5.2.0 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 17 May 2020 09:49:52 PM UTC, original submission:  


sometimes when doing plots, I like to have the x-axis and the y-axis plotted with arrows thus, the ideia is: after ploting things, call function "drawaxis" with or without parameters, and the lines/arrows of axis are displayed.

One way to do this is to use the "annotation" but this requires the normalized numbers of the current figure. And this is a bit cumbersome.

Probably there are a lot of other methods to this but I could not find a simple one.

If octave already has something similar, well, at least I learned a couple of things :)

So, I decided to create my own version of function drawaxis and I would like to share it.

I attached the function as well as some figures.

To use it:


A few things I would like to implement but I don't know how:

1) if the range (xlim/ylim) is changed, how to redraw the drew axis?
2) if figure window has its size changed, how to redraw the drew axis?
3) parameteres like linewidth and color could be passed to function, but how? Using varargin, maybe? Have no idea.

Kind regards,

Leonardo <pocker>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #49109:  angle_and_size.png added by pocker (19KiB - image/png - This one is the correct one)
file #49105:  drawaxis.m added by pocker (5KiB - text/x-objcsrc)
file #49106:  angle_and_size.png added by pocker (18KiB - image/png)
file #49107:  notch.png added by pocker (21KiB - image/png)
file #49108:  example2.png added by pocker (15KiB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pocker (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-17 pocker Attached File- => Added angle_and_size.png, #49109
    2020-05-17 pocker Attached File- => Added drawaxis.m, #49105
        Attached File- => Added angle_and_size.png, #49106
        Attached File- => Added notch.png, #49107
        Attached File- => Added example2.png, #49108

    Back to the top

    Powered by Savane 3.5