|
From: Ethan A M. <sf...@us...> - 2014-10-24 22:05:18
|
On Friday, 24 October, 2014 15:17:01 Daniel J Sebald wrote: > On 10/24/2014 01:18 AM, Philipp K. Janert wrote: > > > > 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. > > I just compiled gnuplot for WXT... It looks like wxWidgets terminal is > quite similar to Qt and it shouldn't be too difficult to make them > consistent. One would need to use the GUI features that come with the > library and wxWidgets has a file dialog: > > http://docs.wxwidgets.org/3.0/classwx_file_dialog.html > > So that part is easy. I'd say that perhaps some thought should be put > into what the desired layout is though--agreeing on that is probably the > difficult part. > > I consider x11 interactive and a few years ago I wrote a patch to > enhance the clipboard for that terminal. What I recall of X11 is that > the format saved to clipboard wasn't really decided until the calling > program wanted to paste, at which point the X11 term would provide the > suitable format. Anyway, I had programmed the shortcut keys Cntrl-A to > highlight the graph with the typical bluish tint and Cntrl-C to paste to > the clipboard. The point was to make working with the terminal much > more fluent. > > One thing to be careful of is the fact that saving to PDF (which is > certainly welcome in my opinion because the first word of PDF means > "portable") in the Qt terminal isn't using the PDF terminal. There are > no colors in the PDF output via Qt, whereas the PDF terminal creates a > PDF output with colors. Do we want as setup in which the interactive > terminals use the PDF terminal, or a setup in which the interactive > terminals use their own custom PDF output? > > Some other comments: > > Right now, WXT is not copying anything to clipboard. Works fine here. Full color full resolution bitmap is sent to clipboard. Ctrl-V in GIMP or soffice pastes it into an open document or canvas. > While the Qt > terminal copies so that the plot image appears in a WYSIWYG word > processor, WXT terminal doesn't create anything. [shrug] works fine for me. > Also the WXT terminal has a fixed aspect ratio where Qt terminal does not. Again not true here. The copy/paste is just a bitmap of whatever the current display shows. You can change the aspect ratio to anything you like either with "set term wxt size XX,YY" or by resizing the open window with the mouse. > The default pen color is now magenta where for years it was red. Was > that change intentional? Very much so. See, e.g. current lead story on lwn.net "Accessibility and the graphics stack" (may not be accessible to non-subscribers until next week) http://lwn.net/Articles/617594/ Or see "help set colors" in version 5rc2 or current cvs. Ethan |