PyX
Pythonでパッケージを使用して密度プロットを作成したい。
私はコードを使用します
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()
そして私はデータを使用します
0 1 0 1 0.12
0 1 1 2 0.56
1 2 0 1 0.98
1 2 1 2 0.23
そして私は結果を得る
もっと面白い色が欲しい。
しかし、使用color.gradient.Rainbow
するとエラーメッセージが表示されます:
「色空間文字列は hsb 色には使用できません」
.
color.gradient.Hue.
たとえば、リバースを使用すると、同様のエラーが発生します。
質問: ここで機能するグレー以外の色のグラデーションは何ですか?