[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58386] function request: drawaxis
From: |
Leonardo |
Subject: |
[Octave-bug-tracker] [bug #58386] function request: drawaxis |
Date: |
Sun, 17 May 2020 17:49:53 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0 |
URL:
<https://savannah.gnu.org/bugs/?58386>
Summary: function request: drawaxis
Project: GNU Octave
Submitted by: pocker
Submitted on: Dom 17 Mai 2020 18:49:52 -03
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
Hello,
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:
plot((-2:10),randn(13,1))
drawaxis(10,pi/6,0.5);
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
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Dom 17 Mai 2020 18:49:52 -03 Name: drawaxis.m Size: 5KiB By: pocker
<http://savannah.gnu.org/bugs/download.php?file_id=49105>
-------------------------------------------------------
Date: Dom 17 Mai 2020 18:49:52 -03 Name: angle_and_size.png Size: 18KiB
By: pocker
<http://savannah.gnu.org/bugs/download.php?file_id=49106>
-------------------------------------------------------
Date: Dom 17 Mai 2020 18:49:52 -03 Name: notch.png Size: 21KiB By: pocker
<http://savannah.gnu.org/bugs/download.php?file_id=49107>
-------------------------------------------------------
Date: Dom 17 Mai 2020 18:49:52 -03 Name: example2.png Size: 15KiB By:
pocker
<http://savannah.gnu.org/bugs/download.php?file_id=49108>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58386>
_______________________________________________
Mensagem enviada pelo Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58386] function request: drawaxis,
Leonardo <=