Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ethan A Merritt Newsgroups: comp.graphics.apps.gnuplot Subject: Re: with image and corners2color Date: Wed, 06 May 2015 11:28:11 -0700 Organization: gnuplot development Lines: 36 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Wed, 6 May 2015 18:27:10 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="8e86a57dfa599721f116da4577f3d1af"; logging-data="21175"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ykU8G44m5ngEU9aqpZIwZ" User-Agent: KNode/4.10.5 Cancel-Lock: sha1:Zlv+ENIdaU+0O5j94oIP36N4XMw= Xref: csiph.com comp.graphics.apps.gnuplot:2894 Vasilis wrote: > Hi all, > > In my program I am generating a lot of 2D color plots. For the moment I > was making splots, using the "set pm3d map explicit corners2color c1" to > map to the lower left corner of the pixel. > > I've tried to convert it to 2d plots using the "with image" but now the > pixel is centered on the value. So all colors are shifted by half pixel in > both dimensions. > > Is there a way to use a similar setting as corners2color for the "with > image" command Gnuplot does not do any averaging or reassignment of pixel color within an image. If the issue is just a coordinate offset, note that you can control the origin and scaling (pixels size) of an image using additional keywords origin= dx= dy= Examples: http://gnuplot.sourceforge.net/demo_cvs/image.html http://gnuplot.sourceforge.net/demo_cvs/barchart_art.html It is also possible that you can simply use the same splot+pm3d commands you already have and produce a 2D plot by first saying "set view map". Ethan > > Thanks in advance > Vasilis