From: Peter S. <ps...@tx...> - 2003-09-06 15:08:57
|
Hi all, I realize this question isn't specific to gnuplot-py, but gnuplot-py users seem to be on the cutting edge of gnuplot use, so I thought someone here might be able to help me. First of all, I am running Mac OS 10.2.6, gnuplot 3.8i (from FINK), and the latest gnuplot-py (from CVS to get the bug fix for temporary file deletion). Now my problem: I would like to make color contour plots (with pm3d for instance) to png, but I can't find palette settings that will allow this. The code is shown below. When I run this code, I get: [localhost] pstoltz% python demo.py Error: terminal "png" does not support continous colors. And the resulting png is drawn without pm3d. I thought the 'set palette maxcolors' should fix the continuous color problem? Is there some specific palette setting I *can* use to write to png? Any help appreciated. And I'd like to second the motion that a new release of gnuplot-py (with the temp file deletion fixed) happen as soon as time allows! Thanks, Peter =========================================== #! /usr/bin/env python import Gnuplot from Numeric import arange, sin, NewAxis g=Gnuplot.Gnuplot() x = arange(35)/2.0 y = arange(30)/10.0 - 1.5 xm = x[:,NewAxis] ym = y[NewAxis,:] m = (sin(xm) + 0.1*xm) - ym**2 g('set data style lines') g('set hidden') g('set contour base') g('set pm3d at sb') g('set palette maxcolors 8') g('set term png') g('set output "out.png"') g.title('An example of a surface plot') g.xlabel('x') g.ylabel('y') g.splot(Gnuplot.GridData(m,x,y, binary=0)) |