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


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

Re: plotting an adaptive mesh

Newsgroups comp.graphics.apps.gnuplot
Date 2017-01-17 06:05 -0800
References <b72ec22a-2510-4fe9-ac7f-ffd25801b221@googlegroups.com> <o5kr2b$ct0$1@solani.org> <c8b4aecb-5e61-4b5b-9d4b-b7f3a1f06fe8@googlegroups.com> <o5l55l$keg$1@solani.org>
Message-ID <32edf6eb-702a-403c-96c5-53cc44102fae@googlegroups.com> (permalink)
Subject Re: plotting an adaptive mesh
From maierd83@gmail.com

Show all headers | View raw


> svg is the _wrong_ format to plot a bitmap. It takes up 30 or 40 bytes
> _for every pixel_! Use jpeg or png. This will already speed up the task.

Ok. I tried (my new idea, see below) with png and indeed the output is smaller. I am not sure if I understand this. I thought that svg saves a rectangle with position of two diagonal sides, and some parameters like fillstyle, fillcolor.... while pixel graphics save each pixel with position and color and if the rectangle consists of 1000 pixels it saves this 1000-times. Obviously png does not use such a raw format.

Anyway, the good news is that I might have found an easy way to do what I want:

1) I plot the data with the largest pitch.
2) I plot each sub-pixel on top of the existing image

The example looks like this:

set terminal png
set output "./test.png"

end = 2

plot for [i=0:2] "test.dat" index i with image pixels


with test.dat:
1 1 1
1 4 2
1 7 3

4 1 8
4 4 9
4 7 4

7 1 5 
7 4 2
7 7 3


3 3 8
3 4 9
3 5 7

4 3 6
4 4 9
4 5 6

5 3 9
5 4 8
5 5 5


6 6 1
6 7 2
6 8 3

7 6 2
7 7 3
7 8 2

8 6 1
8 7 1
8 8 2


Now, I (only?) have to find a way how to define the end-variable. I guess my c-program will print this value in the first line of the data file and gnuplot reads this value.

Thanks for any help. 
I'll check out how png works... ;-)

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