octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PolarAxes project


From: Rik
Subject: Re: PolarAxes project
Date: Mon, 2 Mar 2020 08:16:22 -0800

On 03/02/2020 03:32 AM, address@hidden wrote:
Subject:
Doubt regarding PolarAxes project
From:
akshit chaturvedi <address@hidden>
Date:
03/02/2020 03:32 AM
To:
address@hidden
List-Post:
<mailto:address@hidden>
Precedence:
list
MIME-Version:
1.0
Message-ID:
<CADYp8ya4D7C7iA=E+ntyPm15Sd9p6_7G8Oyk=address@hidden>
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 via email to

[Prev in Thread] Current Thread [Next in Thread]