|
From: Martin B. <m.b...@st...> - 2010-02-17 11:04:59
|
Hello, I want to plot images with gnuplot 4.2.4-6. I wrote a small C program that extracts RGB values for each pixel and stores it to a ASCII-file which should be supported. The first column is the x-position, the second the y-position, the rest are the rgb values: 0 0 255 255 255 1 0 255 255 255 2 0 255 255 255 3 0 255 255 255 4 0 255 255 255 5 0 255 255 255 6 0 255 255 255 7 0 255 255 255 8 0 255 255 255 9 0 255 255 255 ... The first pixels are all white. First question: Should I use a range from 0 to 255 or from 0 to 1? Second question: How can I now plot that data? In the demo scripts I can only find examples with binary data. I tried many options similar to: plot 'image.rgb' format='%uchar%uchar%uchar' using ($3+$4+$5) with rgbimage and plot 'image.rgb' array=(1852x917) with rgbimage when using implicit xy-coordinates (without the first columns). I'm sure someone can point me to the solution. Thanks for your help! Martin |