Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3539

Re: svg with bitmap image graph? (was: Re: plotting an adaptive mesh)

From Ethan A Merritt <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: svg with bitmap image graph? (was: Re: plotting an adaptive mesh)
Date 2017-01-17 14:41 -0800
Organization gnuplot development
Message-ID <o5m6gc$9ba$1@dont-email.me> (permalink)
References (3 earlier) <o5l55l$keg$1@solani.org> <32edf6eb-702a-403c-96c5-53cc44102fae@googlegroups.com> <o5l9gv$nk1$1@solani.org> <d33bcbab-0a7b-46b9-af8a-930e46550dcb@googlegroups.com> <o5lv9d$a1v$1@solani.org>

Show all headers | View raw


Karl Ratzsch wrote:

> Am 17.01.2017 um 16:25 schrieb maierd83@gmail.com:
>> For the moment I am more than happy with the overplotting method.
>> It works very fast and my data sizes are reduced from:
>>         old             new
>> data:  ~18MB        ->  41  kB
>> image: ~33MB (svg)  ->  209 kB (svg) and 7kB (png)
>> 
>> Unfortunately the png has the problem with the blurry lables for the
>> axes...
>> 
> 
> Try pngcairo, it does antialiasing, which the ligd-based png terminal
> does not (I think). Should look a bit better.
> 
> I don't know how to combine an svg graph with png data. There is some
> mention about it in "help svg" (next-to-last paragraph), but I have no
> idea how that would work.


You have this kind of backwards.

By default the svg terminal represents an image by creating a png
bitmap. The png bitmap is saved into a separate *.png file and
referenced by name in the *.svg file.   

This mechanism gives you the advantage of compact image representation,
at the cost of extra bookkeeping because you have to track both the 
*.svg and *.png files together and make sure the reference-by-name in
the *.svg continues to work if you move the files.

Current CVS (5.1) allows you to instead embed the png image bitmap
in the *.svg itself so there is no separate file.  The keyword for
this is "standalone".  This should probably become the default but
as of now it isn't.

However...
   the original question here asked about plotting "with image pixels".
The extra keyword "pixels" tells gnuplot _not_ to represent the image in
a compact bitmap array;  instead it does what you described, drawing a
filled rectangle for each pixel.   Sometimes that has advantages, other
times it does not.  The big disadvantage is the extra space required.
The potential benefit is that when svg renders a bitmap it does 
color-smoothing, which may or may not be acceptable.  The "pixels" mode 
guarantees that each pixel will have the expected color.
See the online demo 

   http://gnuplot.sourceforge.net/demo_svg_5.0/heatmaps.html


Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

plotting an adaptive mesh maierd83@gmail.com - 2017-01-17 01:54 -0800
  Re: plotting an adaptive mesh Karl Ratzsch <mail.kfr@gmx.net> - 2017-01-17 11:18 +0100
    Re: plotting an adaptive mesh maierd83@gmail.com - 2017-01-17 04:49 -0800
      Re: plotting an adaptive mesh Karl Ratzsch <mail.kfr@gmx.net> - 2017-01-17 14:11 +0100
        Re: plotting an adaptive mesh maierd83@gmail.com - 2017-01-17 06:05 -0800
          Re: plotting an adaptive mesh Karl Ratzsch <mail.kfr@gmx.net> - 2017-01-17 15:25 +0100
            Re: plotting an adaptive mesh maierd83@gmail.com - 2017-01-17 07:25 -0800
              svg with bitmap image graph? (was: Re: plotting an adaptive mesh) Karl Ratzsch <mail.kfr@gmx.net> - 2017-01-17 21:36 +0100
                Re: svg with bitmap image graph? (was: Re: plotting an adaptive mesh) Ethan A Merritt <sfeam@users.sourceforge.net> - 2017-01-17 14:41 -0800
  Re: plotting an adaptive mesh maierd83@gmail.com - 2017-01-17 06:07 -0800

csiph-web