三维绘图控件使用方法(4)-矩阵

矩阵:demo_matrix_min

sample_mode=matrix,直接给二维 z 矩阵。示例为 6×6 文本矩阵 + plottype=cylinder(柱状)。

Matrix / MatrixBars
plot3d_set_plottype(chart, "cylinder");
plot3d_set_xlabel(chart, "COL");
plot3d_set_ylabel(chart, "ROW");
plot3d_set_zlabel(chart, "V");
plot3d_set_line_width(chart, 14.0f);
plot3d_set_colormap(chart, "jet");
plot3d_set_sample_mode(chart, PLOT3D_SAMPLE_MODE_MATRIX);
plot3d_set_sample_z_matrix(
    chart, "0,1,2,3,2,1;1,3,5,6,5,3;2,5,8,9,8,5;3,6,9,9,6,3;2,5,8,9,8,5;1,3,5,6,5,3");

要点:

  • 文本矩阵:行用 ; 分隔,列用 , 分隔
  • 未指定范围时,x/y 取列号 / 行号
  • 大矩阵也可用 plot3d_set_z_matrix(chart, zs, cols, rows) 直接喂 float 数组

完整源码:demos/demo_matrix_min.c

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值