|
From: <tim...@en...> - 2006-03-24 19:08:36
|
Hi ! I would like to discuss what is the expected behaviour of the interactive terminals when the user resizes the windows. The X11 terminal is resizing the plot by scaling everything on it except the font size and the linewidths. Thus, if the user makes the window smaller, ticks labels may overlap, the plot box gets closer to the window's edges and may overlap the labels, etc. If another plot command is issued, the ratio is kept, so that the positio= n of the box doesn't change for example. If 'set term x11; replot' is issued, the window size seems to be probed, updating term->xmax and term->ymax, and gnuplot updates the position of the box, the labels, etc. according to the new size. The Windows terminal behaves similarly, except that term->xmax and term->ymax seem to be stored at once on startup only, so that 'set term win; replot' won't change the layout of the plot at all. I am now asking what is the best behaviour in these situations. The purpose of gnuplot is to make the layout automatically, and to make it good. So, to my mind, rescaling everything except the fontsize is kind of strange, as it gives overlapping. I can imagine two other possibilites for the plot behavior when the user changes the window's size : 1) really scale everything - including the font size 2) don't scale anything and just display the plot centered in the windo= w if it is smaller than the window, and if it is bigger add scrollbars on the edges of the window. The first solution leads to another problem : what to do with the text aspect ratio (height to width). Two possibilities again : a) scale the font size with the width of the window only and maintain the proportion of the text. This will give overlapping labels again if the user makes the height of the window smaller b) scale the whole text with the window, so the ratio width/height of the text won't be constant The second solution (don't scale anything) has the advantage to be faster= , as it has basically no complex operation at all to be done when the window's size changes. But what would the user have to do to make the plot fit again in the window ? Just hit 'replot' ? Or 'set term wxt; replot' ? Click a toolbar button called 'Fit plot to window' and then hit 'replot' ? --Note that all these 'replot'-based solutions don't work with multiplot-= - Thanks for your insight on this topic. Best regards, Timoth=E9e Lecomte |