Hi Wolfgang,
On 21.04.11, Wolfgang Engelmann wrote:
> Am Donnerstag, 21. April 2011, 08:48:45 schrieb Matthew West:
> > I've attached a figure that I made with PyX that seems to be somewhat
> > similar to your figure. This shows a 2D histogram, with color being the
> > number concentration. I've also attached the Python code that made this
> > figure. Unfortunately the plotting code is together in one file with some
> > of the data extraction code, but hopefully it's pretty clear what's going
> > on.
> >
> > The basic idea was to just draw lots of rectangles,
>
> Thanks, Matt,
>
> however, in my case its just the opposite: The colors of the spectrum should
> be smooth.
In that case, you might want to try something along the lines (not
tested!)
import pyx
g = pyx.graph.graphxy(width=10, height=10)
g.plot(pyx.graph.data.file("filename.dat", x=1, y=2, color=3),
[pyx.graph.style.surface()])
g.writePDFfile("surface")
where "filename.dat" contains three columns, the first two specifying x
and y position, and the last one determining the color. See
http://pyx.sourceforge.net/manual/module-graph.style.html
for more details. One thing that is not mentioned there is that quite a
few output devices have problems with shading and you might be better
off with a solution based on bitmaps.
@André: I think that adding support for a bitmap-based solution and for a
color key would be a huge win for PyX. At the moment, everybody has to
reinvent the wheel - as can also been seen from this thread...
Cheers,
Jörg
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user