|
From: Philipp K. J. <ja...@ie...> - 2014-10-24 06:18:19
|
I'd like to drum up support for a feature that I don't have the prerequisites to implement myself, but that might not be very difficult to do for somebody with the right background. I think it would be wonderful if both current interactive terminals (Qt and wxt) would allow the user to "save" the current graph to file in a range of file formats (basically PNG and PDF). The way I imagine this would be similar to the way most (if not all) current GUI applications handle this action: when the user selects the corresponding menu entry or presses the button, a file selection dialog pops up, in which the user can select/enter the path- and filename under which to save the graph, and also the file format. Hit "Ok", and the file is created. The current "copy to clipboard" function goes a long way in this direction, but is not perfect. It introduces a dependency on the clipboard and how it works (under different window managers), and may require the user to start another application. (For instance, I can "paste" from the clipboard into the Gimp, but I have not found a way to save directly from clipboard to file - which is what I really need.) "Saving a graph" from gnuplot has always been awkward, and of course there are good and venerable historical reasons for that. But with the Cairo/wxt/Qt-based terminals, we are in a position to make this process so much better - the "copy-to-clipboard" feature shows what it could be like! All I am suggesting is an additional dialog that let's the user choose a filename. I think that would bring gnuplot's behavior much closer to what users are expecting, given their experience with other GUI applications. (The classic, text-based process would continue to exist, unchanged, for scripting purposes and fine-grained control.) But: I can't do it myself. I have never programmed wxt (and Qt most recently almost 10 years ago) and I am not going to figure out how to enter this functionality into gnuplot. (I did take a look at wxt_gui.cpp and realized quickly that this is beyond me.) But for someone who knows these libraries, this might not be that difficult a task: both libs provide complete widgets for file selection dialog (wxFileDialog and QFileDialog, resp). Would it be very difficult to hook them up in the right places? I think it would make a world of a difference to people - and do much to dispell the myth that gnuplot is "hard to learn". Best, Ph. |