Menu

appearance of plots from wxt, png and pngcairo

Help
2017-03-19
2017-03-19
  • Brian Murphy

    Brian Murphy - 2017-03-19

    I am working on an interactvie plotting capability in Excel using gnuplot. I am finding a very good match in appearance between interactive plot windows made with set terminal wxt, and graphics files made with set terminal png. Having a good match is important for the way I'm doing things in Excel.

    However, set terminal png doesn't seem to support dashed line types. So I switched to pngcairo, and that gives me dashed lines, but the appearance of pngcairo does not match wxt nearly as well as png (e.g. font sizes change).

    Is there an easy way to either get dashed lines in png, or to get pngcairo output to match wxt output?

    The plots I am currently focused on are 3d plots made with splot.

    Thanks,

    Brian M.

     
  • Ethan Merritt

    Ethan Merritt - 2017-03-19

    If you export to png from the wxt terminal itself (button in upper left of toolbar) it should match exactly.

    The fonts in wxt and pngcairo should be an exact match character-by-character since both terminals use the same cairo code underneath. What you may be noticing is the difference in the font size relative to the size of the plot window. One option is to use the "fontscale" option when you select the terminal. For instance if you think that the fonts come out too small visually in your png images, try
    set term pngcairo fontscale 2.0

     
  • Brian Murphy

    Brian Murphy - 2017-03-19

    Thanks, Ethan. You have given me some good pointers. I will work on those and report back, but it could be a few days.

    FWIW, what I've got working so far in Excel is looking very good. A gnuplot png is placed on the worksheet where the user's data resides. Clicking on the png launches a wxt window where the user can rotate/resize or even revise the plot from a gnuplot command window. When the user returns to excel he is prompted whether or not to update the png with what he just did in the wxt. Window shapes and sizes are important, as is the current Excel worksheet display zoom percentage.

     
  • Brian Murphy

    Brian Murphy - 2017-03-19

    I'm getting close. You are indeed right that the Export Plot toolbar button in the wxt window creates a png virtually indistinguishable from the wxt window. Yipee!

    Is there a command that simply duplicates the action performed by the Export button? If so, I think that would be perfect.

    I tried various forms of "set term pngcairo" with fontscale and size specifiers, but could not find a match for the Export button.

     

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.