Menu

#568 To allow scrolling for big graphs in screen/interactive terminals

open
None
5
2023-12-09
2023-12-03
No

Discussion

  • Ethan Merritt

    Ethan Merritt - 2023-12-04

    Please clarify your request.

    Are you asking about plots that are too big to fit on your current display screen? If so, that's a matter for your operating system's window manager or screen configuration utility. Gnuplot is perfectly happy to draw a graph into a virtual screen that is larger than your physical screen; it doesn't need to know anything about that. At least, that's the way it works in my experience. If it doesn't work for you then we will need more information about what your O/S and screen manager and desktop configuration is.

     
  • Justin Sales

    Justin Sales - 2023-12-06

    For plots that are too dense to fit in the screen, it's useful to make set size (>1),1 then plot (for example, daily temperatures along a century); I don't know for Unix, but for Windows (terminal type set to wxt or win) I would expect then to see the typical horizontal scroll bar but instead there is nothing: you just see the beginning of the graph, nothing else. Try this simple example:
    set size 10,1; plot sin(x)

     
  • Ethan Merritt

    Ethan Merritt - 2023-12-06

    set size does not support values greater than 1. It happens to work for the PostScript terminal for historical reasons, but all other terminals will handle it badly, for varying degrees of "badly". Perhaps the documentation should state this more strongly. The fundamental point is that set size is not the command you want anyhow. It does not change the size of the window you are drawing into; it only changes the ranges of coordinates that are passed through to the graphics layer.

    The command you want is set term <whatever> size xmax, ymax. You can set those values as large as you want, although the physical device or the windowing system may limit what is actually achievable.

     
  • Justin Sales

    Justin Sales - 2023-12-09

    set term win size 1,1 makes gnuplot crash. set term wxt size 1,1 makes the plot disappear (I assume 1,1 is the scale, not the maximum value of x and y, which in my case are much bigger)

     
  • Ethan Merritt

    Ethan Merritt - 2023-12-09

    No. Most of the terminals want a size in pixels. set term wxt size 1,1 means create a single-pixel output window. Terminals that produce hard-copy output, e.g. pdf or postscript, accept physical measures. So you can say set term postscript 5in, 3in.

     
  • Justin Sales

    Justin Sales - 2023-12-09

    Alright. I've tried big numbers (but not huge) like set term wxt size 14400, 7200 and what I obtain is the plot occupying the full window, not more (so no scroll bars); then I've added a zero to both values so as to have 144000 and 72000 instead and I've obtained exactly the same plot. When trying with win terminal, I get the same, except for 144000 and 72000 that crashes.

     
    • Ethan Merritt

      Ethan Merritt - 2023-12-09

      I have no experience on Windows, so I can't comment there. On linux this is all outside the scope of an individual program like gnuplot. Handling large windows, adding scroll bars, pan/zoom to off-screen elements - those are all handled by the window manager and apply to all programs equally.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.