矩形圖形大家好,
JMP 中是否有一種簡單的方法來生成具有不同矩形(不同大小)的圖形? 請參閱附加的示例。
通過這張圖,我想概述不同的材料及其相應的形狀。
提前致謝。
約翰內斯
數據表圖形回复:矩形圖形你有什麼樣的數據? 你可以例如創建自定義形狀文件
回复:矩形圖形我附上了一個帶有示例數據的文件。 我確實有矩形每個角的坐標。
回复:矩形圖形JMP 有一套完整的圖形基元,可用於創建諸如矩形之類的東西。腳本索引詳細說明了可用的函數並給出了它們的使用示例。


這是來自 Rect() 函數描述的腳本。
Names Default To Here( 1 );
New Window( "Example",
Graph Box(
Pen Color( "Green" );
Pen Size( 2 );
Fill Color( "Red" );
Rect( 15, 75, 65, 55, 1 );
Rect( 10, 80, 70, 50 );
)
);
回复:矩形圖形您的數據中有很多重疊。這段代碼會做到;我將矩形設置為未填充以顯示重疊。
dt = data table("Rectangles");
// Set some constants
xmin = 0;
xmax = 4000;
ymin = 0;
ymax = 1500;
xres = 800;
yres = 500;
color_list = {"Red", "Blue", "Green", "Orange", "Purple"};
filled_rect = 0; // set to 1 for filled rectangles
heat_map_win = New Window( "Example Rectangles ",
rect_gb = Graph Box(
framesize( xres, yres ),
xscale(xmin, xmax),
yscale(ymin, ymax),
for (i = 1, i <= nrows(dt), i++,
xleft = dt:x 1[i];
xright = dt:x 3[i];
ybottom = dt:y 1[i];
ytop = dt:y 4[i];
pcolor = color_list[dt:material[i]];
pen color(pcolor);
fill color(pcolor);
rect(xleft, ytop, xright, ybottom, filled_rect);
),
)
);

回复:矩形圖形如果您對前面的哪個有問題,還請查看透明度命令。
兩個矩形都是用 50% alpha 繪製的