displaying image with gnuplot - while specifying the display size

View: New views
2 Messages — Rating Filter:   Alert me  

displaying image with gnuplot - while specifying the display size

by Ravid Gabbay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I have a png image with geometry 1600x500, which I want to display on gnuplot

I converted it into avs by doing: convert /tmp/map.png  /tmp/map.avs

and I display it on gnuplot using: plot '/tmp/map.avs' binary filetype=auto with rgbimage

My problem is that I want the entire image to be displayed inside the gnuplot rectangle (0,0)-(1.6,0.5)

and currently the image is displayed within the rectangle (0,0)-(1600,500)

when I try to resize the image to fit my desired size, the image is displayed very poorely (low resolution)


How can I do it?

Thanks

Re: displaying image with gnuplot - while specifying the display size

by Thomas Sefzick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

set xrange [0:1.6]
set yrange [0:0.5]
set x2range [0:1600]
set y2range [0:500]

plot '/tmp/map.avs' binary filetype=auto axes x2y2 with rgbimage

> Hello,
> I have a png image with geometry 1600x500, which I
> want to display on gnuplot I converted it into avs by
> doing: convert /tmp/map.png  /tmp/map.avs
> and I display it on gnuplot using:
> plot '/tmp/map.avs' binary filetype=auto with rgbimage
> My problem is that I want the entire image to be
> displayed inside the gnuplot rectangle (0,0)-(1.6,0.5)
> and currently the image is displayed within the
> rectangle (0,0)-(1600,500)
>
> when I try to resize the image to fit my desired size,
> the image is displayed very poorely (low resolution)
>
> How can I do it?
> Thanks