I wanna make a density plot with PyX
package in python.
I use the code
from pyx import *
import numpy
import math
from pyx.graph import axis
g = graph.graphxy(height=8, width=8,
x=graph.axis.linear(min=0.0, max=2.0, title=r"$x-axis$"),
y=graph.axis.linear(min=0.0, max=2.0, title=r'$y-axis$'))
g.plot(graph.data.file("datatotest.dat", xmin=1, xmax=2, ymin=3, ymax=4, color=5, title=r"$bar$"),
[graph.style.rect(gradient=color.gradient.Gray)]
)
g.writePDFfile()
and I use the data
0 1 0 1 0.12
0 1 1 2 0.56
1 2 0 1 0.98
1 2 1 2 0.23
and I get the result
I wanna have more interesting colors.
But using color.gradient.Rainbow
gives the error message:
"colorspace string not available for hsb colors"
.
I get similar error for color.gradient.Hue.
and when using Reverse for example.
Question: What other color gradient other than gray work here?