|
From: theozh <th...@gm...> - 2018-08-14 16:29:53
|
The interactive wxt terminal offers the nice feature to copy the graph to the clipboard. When pasting this graph as bitmap into other applications the size will depend on the resolution (dpi or ppi). Example: A plot with 567 x 567 pixels will be 15x15cm when copied to other applications. Apparently, gnuplot sets the resolution to 96 dpi. However, this 15x15cm is to large and I have to manually scale it down in the application to e.g. 7.5x7.5cm If it was possible to set the resolution to 192 dpi in gnuplot, this annoying scaling step for every graph would be obsolete. Changing the resolution with an additional program is also no practical solution. Creating a graph within gnuplot with half the size (283x283) is also no solution since many details will be missing. Copying to EMF might be an alternative, but I don't want to go via an additional file on disk. Any ideas, alternatives? |
|
From: Ethan A M. <eam...@gm...> - 2018-08-14 16:45:55
|
On Tuesday, 14 August 2018 18:29:35 theozh wrote: > The interactive wxt terminal offers the nice feature to copy the graph to the clipboard. > When pasting this graph as bitmap into other applications the size will depend on the resolution (dpi or ppi). > > Example: > A plot with 567 x 567 pixels will be 15x15cm when copied to other applications. > Apparently, gnuplot sets the resolution to 96 dpi. So far as I know gnuplot plays no part in this. This is basically a screen shot, right? Pressing the clipboard widget in gnuplot just triggers a screenshot of the current window. The dpi probably comes from the resolution of your screen, or at any rate what the computer thinks is the resolution of your screen. If it is possible to change this at all, it would be via some setting in the clipboard manager program. Ethan > However, this 15x15cm is to large and I have to manually scale it down in the application to e.g. 7.5x7.5cm > > If it was possible to set the resolution to 192 dpi in gnuplot, this annoying scaling step for every graph would be obsolete. Changing the resolution with an additional program is also no practical solution. > Creating a graph within gnuplot with half the size (283x283) is also no solution since many details will be missing. Copying to EMF might be an alternative, but I don't want to go via an additional file on disk. > > Any ideas, alternatives? > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info -- |
|
From: theozh <th...@gm...> - 2018-08-14 18:39:23
|
Ok, it's just a screenshot. I thought/hoped that this was some data from gnuplot which gnuplot still can somehow influence. Well, then Windows operating system or the application apparently assumes that the clipboard contains an image with 96 dpi. Hmm, then probably there's not much which I can do? At least, I haven't found yet any settings in Windows or the application which can change this dpi value. |
|
From: theozh <th...@gm...> - 2018-08-14 20:15:57
|
... wouldn't there be any possibility with gnuplot to "save" to the clipboard? Kind of a "clipboard" terminal allowing for the setting of dpi (PNG,BMP) or cm (PDF, EMF, SVG)? |
|
From: Ethan M. <eam...@gm...> - 2018-08-14 20:45:53
|
On Tue, Aug 14, 2018 at 1:15 PM, theozh <th...@gm...> wrote: > ... wouldn't there be any possibility with gnuplot to "save" to the > clipboard? > Kind of a "clipboard" terminal allowing for the setting of dpi (PNG,BMP) > or cm (PDF, EMF, SVG)? > > I don't understand the question. Isn't that exactly what it does now? It is for the wxt and qt terminals anyway. There is one widget that saves to the clipboard and another widget that saves to a filetype of your choice. Can you back up one step and explain why you can about the dpi field? In my experience most if not all programs that read a bitmap file ignore this field. For instance if you import a bitmap file into Word or LaTeX or PowerPoint or whatever you can scale it up or down to fit the desired size without regard to whatever the original dpi was. What program are you dealing with where this is an issue? |
|
From: Ethan M. <eam...@gm...> - 2018-08-14 20:46:52
|
On Tue, Aug 14, 2018 at 1:45 PM, Ethan Merritt <eam...@gm...> wrote: > On Tue, Aug 14, 2018 at 1:15 PM, theozh <th...@gm...> wrote: > >> ... wouldn't there be any possibility with gnuplot to "save" to the >> clipboard? >> Kind of a "clipboard" terminal allowing for the setting of dpi (PNG,BMP) >> or cm (PDF, EMF, SVG)? >> >> I don't understand the question. Isn't that exactly what it does now? > It is for the wxt and qt terminals anyway. There is one widget that saves > to the clipboard > and another widget that saves to a filetype of your choice. > > Can you back up one step and explain why you can about the dpi field? > ^^^^^ care > In my experience most if not all programs that read a bitmap file ignore > this field. > For instance if you import a bitmap file into Word or LaTeX or PowerPoint > or > whatever you can scale it up or down to fit the desired size without > regard to > whatever the original dpi was. > What program are you dealing with where this is an issue? > > |
|
From: theozh <th...@gm...> - 2018-08-14 21:19:32
|
ok, I try again. I create many graphs with gnuplot. I copy these graphs e.g. to Powerpoint or Word, etc. In these programs the images will appear "too large", i.e. I need them half size. Of course, I can scale them down manually in PPT or Word, over and over again and again. The idea was to copy a graph directly from gnuplot which will appear with the proper size in PPT, Word, etc. Simply reducing the pixel count in gnuplot is not an option because you will lose details and it will look pixelated. I also can copy&paste the clipboard into an image viewer (e.g. GIMP, IrfanView, etc.) and manually set the DPIs to 192 over and over again. Copy the image again and paste it into PPT, Word, etc. With this, the size will be the desired size. However, I wanted to a) avoid loosing details and pixelated images, b) avoid scaling in PPT, Word,... and c) avoid using a third program. |
|
From: Ethan M. <eam...@gm...> - 2018-08-14 21:43:24
|
On Tue, Aug 14, 2018 at 2:19 PM, theozh <th...@gm...> wrote: > ok, I try again. > I create many graphs with gnuplot. I copy these graphs e.g. to Powerpoint > or Word, etc. > In these programs the images will appear "too large", i.e. I need them > half size. > Of course, I can scale them down manually in PPT or Word, over and over > again and again. > The idea was to copy a graph directly from gnuplot which will appear with > the proper size in PPT, Word, etc. > I am not a frequent Word user, but I think there is a preferences setting where you can change the default import resolution. For instance: https://support.office.com/en-ie/article/change-the-default-resolution-for-inserting-pictures-in-office-2016-f4aca5b4-6332-48c6-9488-bf5e0094a7d2 > Simply reducing the pixel count in gnuplot is not an option because you > will lose details and it will look pixelated. > I also can copy&paste the clipboard into an image viewer (e.g. GIMP, > IrfanView, etc.) and manually set the DPIs to 192 over and over again. Copy > the image again and paste it into PPT, Word, etc. With this, the size will > be the desired size. > However, I wanted to a) avoid loosing details and pixelated images, b) > avoid scaling in PPT, Word,... and c) avoid using a third program. > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/ > lists/listinfo/gnuplot-info > |
|
From: theozh <th...@gm...> - 2018-08-15 03:46:10
|
Thank you for the link, I also came across this page. Well, this is for MSOffice 2016. In MSOffice <=2013 I haven't found such a setting. In MSOffice2013 there is a similar DPI setting but for *exporting* pictures not for *importing* pictures. Too bad... |
|
From: theozh <th...@gm...> - 2018-08-16 17:44:26
|
Since my program which generates the gnuplot code is written in Python, I finally can also use Python to get a screenshot of the gnuplot wxt terminal. It assumes that the window frame around the plot stays always the same, in my case (l,t,r,b)margins = (8,63,8,31) pixels. Unfortunately, one flaw is that I had to insert a waiting time because the gnuplot window is not coming to front immediately. Maybe somebody has a solution for this? See: https://stackoverflow.com/questions/51879113 With this as a base, I can implement something where I can give a dimension in mm or cm and get the screenshot on the clipboard scaled accordingly when copied into the final application (Word, PPT, LibreOffice, etc.). Maybe this is also useful to somebody else... |