It looks like Rik did reply back then, but it seems the answer just went to the maintainers list. not certain that akshit saw it, so cc'ing below.
---------- Forwarded message ---------
From:
Rik <address@hidden>Date: Mon, Mar 2, 2020 at 11:16 AM
Subject: Re: PolarAxes project
To: <
address@hidden>
Subject:
Doubt regarding PolarAxes project |
From:
akshit chaturvedi <address@hidden> |
Date:
03/02/2020 03:32 AM |
Greetings,
I'm a bit confused. Am I supposed to make a PolarAxes
or a PolarAxis object?
The m-file function will be polaraxes. This will perform input
validation, have a help string, contain a few BIST tests. It should
have compatible syntax with Matlab
(
https://www.mathworks.com/help/matlab/ref/polaraxes.html). The
m-file will need to call C++ code to create an actual polaraxes
object. In axes.m, the call is
htmp = __go_axes__ (hpar, varargin{:});
The code for __go_axes__, and for __go_polaraxes__ when it is
developed, is in libinterp/corefcn/graphics.cc.
In Octave, we have Axes and an Axis function which
pretty much do the same thing.
These are quite different. axes.m creates an axes object, whereas
axis.m modifies the properties of an existing object by, for
example, changing the limits of the x-axis or changing the aspect
ratio.
Also, in the project description, it's stated that
PolarAxes is implemented using 2D axes and callback
listeners.
The function polar.m in scripts/plot/draw implements what appears to
be polar axes using a regular 2-D axes object. The project should
not be to replicate this in C++, but to create a brand new graphics
object that is specifically for displaying polar axes.
Can u pls tell me how this is done cuz whenever I type
PolarAxes it just shows yet to be implemented.
Lastly, could you pls tell me what's happening here :
function h = axes (varargin) |
|
|
|
if (nargin == 0 || nargin > 1) |
|
## Idk what's happening from here onwards |
|
idx = find (strcmpi (varargin(1:2:end), "parent"), 1, "first"); |
|
if (! isempty (idx) && length (varargin) >= 2*idx) |
|
cf = varargin{2*idx}; |
|
varargin([2*idx-1, 2*idx]) = []; |
|
else |
|
cf = gcf (); |
|
endif
Yours sincerely,
Akshit
|
This is looking for the property/value pair
"parent"/figure_graphics_handle. If there is no such property
given, Octave uses the current figure handle (gcf).
--Rik