Plots changing on different screens

Dragging a figure window to another screen (with a different resolution) changes the entire proportions of the plot, e.g. widths of the outer margins, the font size relative to the plot size etc:

Is it supposed to be like this? Does one have to stick to a certain screen (or at least to this particular resolution) after having found suitable axis positions and font sizes to maintain the scalings?

working with Windows 10
attached figures created with version 6.3.0
Octave installed with installer exe

1 Like

As I mostly work only on one monitor in Linux, thus I cannot reproduce the problem.

Maybe setting a fixed measure for the font size might help?

ax = axes ();
plot  (ax, 1:10);
title (ax, "Hello World");
set (ax, "fontsize", 20);
set (ax, "fontunits", "pixels");
fontunits : "centimeters" | "inches" | "normalized" | "pixels" | { "points" }
     Units used to interpret the "fontsize" property.

It does not:

Is one of the screen is a high def screen with a scaling >100% applied ?

Other listed fontunits didn’t do the trick either?

No, don’t.
Some of them do another trick though: “centimeters”, “inches” and “normalized” make the title appear very small:

(The rest of the code is like in your earlier post.)

The resolution of both screens is 1920 x 1080. But, one of them being much smaller, I had the scaling set to 150 %. After changing it back to 100 %, the proportions of the figure are exactly the same on both screens. So this seems to answer the question. Thank you.

Thank you for the additional tests. There seems to be an Octave/qt related problem with scaling. @Pantxo do you have any idea how to fix this one?

Edit: There are also some open bugs:

Reading through them, the values of


are used to calculate the respective image object sizes. My suspicion is, that those values are valid only for a partictular display. When dragged to another display, the values might not be “useful” anymore. However, once the plot is generated, does it get repainted when dragging the window causing the re-scaling? :thinking:


note – this is windows specific. It looks to me Win does scaling differently from Linux

1 Like

IIRC, the general outline of figures when moving them between monitors with differing DPI settings was fixed at some point in the past. That might have been for bug #49053, figure scaling issue with Qt 5 on macOS with Retina / HiDPI scaling.

It might be that we still need to scale the font size, too…

We already scale font size on high-res screens, i.e. those for which the hidden figure property __device_pixel_ratio__ is larger than 1 (2 for retina). What is the value of this property when the figure is moved from one screen to the other? E.g.

hf = figure ();
get (hf, "__device_pixel_ratio__")
## Move the figure to the other screen
get (hf, "__device_pixel_ratio__")

I get “1” in all cases (1920x1200 ,scale 1; and 3840x2160 with scale 1 or 2)

Thats the first time, I found a similar problem to mine!
Fun Fact and my problem:
I am getting the same issues with my PC and a 1920y1080 screen and
the same PC, but I’m connected via remote from a Laptop with 1600x900.
both are 100%.