我正在可视化一些数据。我想使用日期作为变量来定义散布颜色。
数据具有三个变量:date,x和y; x和y用于生成散点图,我想按日期为散点着色。
数据如下:
Rectangle bounds = ctrl.Parent.RectangleToScreen(ctrl.Bounds);
Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height);
using (Graphics g = Graphics.FromImage(bitmap))
{
g.CopyFromScreen(bounds.Location, new Point(0,0), bounds.Size);
}
错误:“ c”参数具有1716个元素,不能与大小为0的“ x”,大小为0的“ y”一起使用。
甚至我也尝试使用 x y z
0 29.3895 0.098188 2012-05-18
1 29.2847 0.125327 2012-05-21
2 29.6206 0.131565 2012-05-22
x = cal['x']
y = cal['y']
z = cal['z']
sns.set()
sns.set_style('dark')
fig, ax = plt.subplots(figsize=(10,7))
point = sns.scatterplot(x,y,c=z,cmap='Reds')
plt.colorbar('point')
plt.show()
。
我希望我能得到一张一年彩色的散点图
有什么想法吗?非常感谢!