Re: PolarAxes project

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: PolarAxes project

Rik-4
On 03/02/2020 03:32 AM, [hidden email] wrote:
Subject:
Doubt regarding PolarAxes project
From:
akshit chaturvedi [hidden email]
Date:
03/02/2020 03:32 AM
To:
[hidden email]
List-Post:
[hidden email]
Precedence:
list
MIME-Version:
1.0
Message-ID:
[hidden email]
Content-Type:
multipart/alternative; boundary="000000000000777f3f059fdd8bb8"
Message:
4

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
Reply | Threaded
Open this post in threaded view
|

Fwd: PolarAxes project

nrjank
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 <[hidden email]>
Date: Mon, Mar 2, 2020 at 11:16 AM
Subject: Re: PolarAxes project
To: <[hidden email]>


On 03/02/2020 03:32 AM, [hidden email] wrote:
Subject:
Doubt regarding PolarAxes project
From:
akshit chaturvedi [hidden email]
Date:
03/02/2020 03:32 AM
To:
[hidden email]
List-Post:
[hidden email]
Precedence:
list
MIME-Version:
1.0
Message-ID:
[hidden email]
Content-Type:
multipart/alternative; boundary="000000000000777f3f059fdd8bb8"
Message:
4

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