The plot is dynamic - i.e. data that are plotted change depending on selection in a widget.
Its size is not fixed (using stretch_both in the layout).
I would like to place a Label in the plot that would display the correlation coefficient of the data currently displayed. The Label should change every time different data is selected.
The issue I have is, that since I do not know the size of the plot in screen coordinates beforehand (see point 3) I cannot place the label in a location I want (i.e. somewhere roughly in the upper right corner), using screen coordinates. Also, since the plot is dynamic, I cannot use data coordinates to place the Label.
Label accepts screen units, as shown in the docs. Are you saying you tried that and could not get the result you wanted? Please provide a complete Minimal Reproducible Example of what you have attempted.
Hello Bryan, I am afraid I don’t know how to make a MRE, as I don’t know how to do what I want to do - it is not a bug. I will try to explain again.
I want to place label in the upper right corner of a plot (axis) - say 10% off the right and top border. Since the plot size is not set to fixed but rather the sizing_mode is set “stretch_both”, I don’t know the size of the plot (in pixels) at the time of its creation. So I do not know to what to set the x and y screen coordinates in the Label.