☑ Can't set tick label for 3D graphs

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

☑ Can't set tick label for 3D graphs

Swiss_Knight
This post was updated on .
Hi,
I can't set ticklabel on axis in Octave 4.0.2 on Ubuntu.
It seems that this property, among others, doesn't appear in the get(gca) returns.

I wonder why and if it's in the pipe for soon ?
Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Can't set tick label for 3D graphs

Mike Miller-4
On Tue, Jul 19, 2016 at 09:40:38 -0700, Swiss_Knight wrote:
> Hi,
> I can't set ticklabel on axis in Octave 4.0.2 on Ubuntu.
> It seems that this property, among others, doesn't appear in the get(gca)
> returns.
>
> I wonder why and if it's in the pipe for soon ?

Did you mean "xticklabel", "yticklabel", and "zticklabel"? These are
available and functional.

--
mike

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Can't set tick label for 3D graphs

Swiss_Knight
Hello,
Yes I mean x,y,z ticklabel. :)
I got this return if I try to set on of these :
> error: set: unknown text property xticklabel

And if I check properties of, for example, the x axis (of a surf() graph) with get(x_axis_handle) I can't even see the word 'label' in there :
> ans =

  scalar structure containing the fields:

    beingdeleted = off
    busyaction = queue
    buttondownfcn = [](0x0)
    children = [](0x1)
    clipping = off
    createfcn = [](0x0)
    deletefcn = [](0x0)
    handlevisibility = off
    hittest = on
    interruptible = on
    parent =    -144.33
    selected = off
    selectionhighlight = on
    tag =
    type = text
    uicontextmenu = [](0x0)
    userdata = [](0x0)
    visible = on
    __modified__ = on
    backgroundcolor = none
    color =

               0           0           0

    displayname =
    edgecolor = none
    editing = off
    erasemode = normal
    extent =

          6.1941      4.4047     0.34556    0.034138

    fontangle = normal
    fontname = *
    fontsize =         10
    fontunits = points
    fontweight = normal
    horizontalalignment = left
    interpreter = tex
    linestyle = -
    linewidth =        0.5
    margin =          2
    position =

          5.6389      3.1987     -17.445

    rotation =          0
    string = Ig
    units = data
    verticalalignment = top


Here is the graph generation commands :
figure(1);
clf;
surf(XX,YY,Incertitude');
title("Max Incertitude as function of (x,y)");
cx1=xlabel("X param");
cy1=ylabel("Y param");
cz1=zlabel("I value");
axis([min(X) max(X) min(Y) max(Y)]);
#set(cx1,"xticklabel",[X]);



XX and YY are the results of a meshgrid command on x and y, of course.

Thanks. :)
Reply | Threaded
Open this post in threaded view
|

Re: Can't set tick label for 3D graphs

Mike Miller-4
On Wed, Jul 20, 2016 at 11:16:35 -0700, Swiss_Knight wrote:

> Hello,
> Yes I mean x,y,z ticklabel. :)
> I got this return if I try to set on of these :
> > /error: set: unknown text property xticklabel/
>
> And if I check properties of, for example, the x axis (of a surf() graph)
> with get(x_axis_handle) I can't even see the word 'label' in there :
> > /ans =
>
>   scalar structure containing the fields:
>
>     beingdeleted = off
>     busyaction = queue
>     buttondownfcn = [](0x0)
>     children = [](0x1)
>     clipping = off
>     createfcn = [](0x0)
>     deletefcn = [](0x0)
>     handlevisibility = off
>     hittest = on
>     interruptible = on
>     parent =    -144.33
>     selected = off
>     selectionhighlight = on
>     tag =
>     type = text
>     uicontextmenu = [](0x0)
>     userdata = [](0x0)
>     visible = on
>     __modified__ = on
>     backgroundcolor = none
>     color =
>
>                0           0           0
>
>     displayname =
>     edgecolor = none
>     editing = off
>     erasemode = normal
>     extent =
>
>           6.1941      4.4047     0.34556    0.034138
>
>     fontangle = normal
>     fontname = *
>     fontsize =         10
>     fontunits = points
>     fontweight = normal
>     horizontalalignment = left
>     interpreter = tex
>     linestyle = -
>     linewidth =        0.5
>     margin =          2
>     position =
>
>           5.6389      3.1987     -17.445
>
>     rotation =          0
>     string = Ig
>     units = data
>     verticalalignment = top/
>
> Here is the graph generation commands :
> /figure(1);
> clf;
> surf(XX,YY,Incertitude');
> title("Max Incertitude as function of (x,y)");
> cx1=xlabel("X param");
> cy1=ylabel("Y param");
> cz1=zlabel("I value");
> axis([min(X) max(X) min(Y) max(Y)]);
> #set(cx1,"xticklabel",[X]);/
>
>
> XX and YY are the results of a meshgrid command on x and y, of course.

The return value of xlabel is not a handle to the axes object. What
you're looking at are handles to the labels, which are text objects.

What you want is either

  ax = gca ();

or

  ax = get (cx1, "parent");

and then

  set (ax, "xticklabel", ...
  set (ax, "yticklabel", ...
  set (ax, "zticklabel", ...

--
mike

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Can't set tick label for 3D graphs

Swiss_Knight
Oh shame on me...
Thank you Mike, what I thought to be an issue is now solved.
sorry for the inconvenience.
Regards.