uitable does not accept placement in subplot

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

uitable does not accept placement in subplot

Jens Ruetten
Hi there,
I am trying to show live data in a single plot window with multiple
subplots, which update in regular intervals.

So far so good, what i cannot manage is adding a table to visualize a list
of discrete values in a subplot segments. Calling

>>subplot(2,1,1);
>> uitable(f, "Data", d, "RowName", row_names, "ColumnName", col_names);

yields no reaction at all, when i try

>>subplot(2,1,2);
>> uitable(f, "Data", d, "RowName", row_names, "ColumnName", col_names);

Octave returns the following error message:

error: uitable: invalid parent handle.
error: called from
    __uiobject_split_args__ at line 37 column 7
    uitable at line 207 column 13



Any ideas for a workaround?
Cheers
^j



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: uitable does not accept placement in subplot

mmuetzel
Am 23. September 2020 um 12:06 Uhr schrieb "Jens Ruetten":

> Hi there,
> I am trying to show live data in a single plot window with multiple
> subplots, which update in regular intervals.
>
> So far so good, what i cannot manage is adding a table to visualize a list
> of discrete values in a subplot segments. Calling
>
> >>subplot(2,1,1);
> >> uitable(f, "Data", d, "RowName", row_names, "ColumnName", col_names);
>
> yields no reaction at all, when i try
>
> >>subplot(2,1,2);
> >> uitable(f, "Data", d, "RowName", row_names, "ColumnName", col_names);
>
> Octave returns the following error message:
>
> error: uitable: invalid parent handle.
> error: called from
>     __uiobject_split_args__ at line 37 column 7
>     uitable at line 207 column 13
>
>
>
> Any ideas for a workaround?
> Cheers
> ^j
>
>

I'm not sure what `f` is in your examples.
But afaict the parent for uitable must be a figure or uipanel.
`subplot` creates an axes. You can't have an axes object be the parent for `uitable`.

Try to adapt the 'Position' property of the uitable instead.

HTH,
Markus



Reply | Threaded
Open this post in threaded view
|

Re: uitable does not accept placement in subplot

BGreen
In reply to this post by Jens Ruetten

On Wed, Sep 23, 2020, 6:10 AM Jens Ruetten <[hidden email]> wrote:
Hi there,
I am trying to show live data in a single plot window with multiple
subplots, which update in regular intervals.

So far so good, what i cannot manage is adding a table to visualize a list
of discrete values in a subplot segments. Calling

>>subplot(2,1,1);
>> uitable(f, "Data", d, "RowName", row_names, "ColumnName", col_names);

yields no reaction at all, when i try

>>subplot(2,1,2);
>> uitable(f, "Data", d, "RowName", row_names, "ColumnName", col_names);

Octave returns the following error message:

error: uitable: invalid parent handle.
error: called from
    __uiobject_split_args__ at line 37 column 7
    uitable at line 207 column 13



Any ideas for a workaround?
Cheers
^j



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


What is f? That's where the error is coming in, since it takes the place for the parent handle.


Reply | Threaded
Open this post in threaded view
|

Re: uitable does not accept placement in subplot

Jens Ruetten
In reply to this post by mmuetzel
Thank you both, the problem was indeed the target object f, which was defined
elsewhere...


For those interested in the final solution using the subplot grid as
reference:


    liveViewer=figure();
    stubby=subplot(4,2,4);
    stubPos=get(stubby, "position");
    delete(stubby);
    uitable(liveViewer, "Data", [1 2 3; 4 5 6; 7 8 9], "RowName",
{"a","b","c"}, "ColumnName",...
    {"I","II","III"}, "units", "normalized", "position", stubPos);



Cheers
^j



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html