我在data have;
do _n_ = 1 to 1000;
key1 = ceil (10 * ranuni(123));
key2 = ceil (10 * ranuni(123));
key3 = ceil (10 * ranuni(123));
sat1 = 100 + ceil (4 * ranuni(123));
sat2 = 100 + ceil (4 * ranuni(123));
output;
end;
run;
proc sql;
* result set for distinct rows -- some key repetition still present;
create table distinct_all as
select distinct * from have
;
* result set for distinct keys -- fewer than distinct rows;
create table keys as
select distinct key1,key2,key3 from have
;
* result for distinct keys with an arbitrary row amongst the repeateds;
create table distinct_key_arb_sat(drop=seq) as
select key1, key2, key3, sat1, sat2, monotonic() as seq
from have
group by key1, key2, key3
having seq = min(seq)
;
平面上有6个点:(x,y)
和x=[x1,x2,x3,x4,x5,x6]
y=[y1,y2,y3,y4,y5,y6]
我想在两点之间,在每个轴import matplotlib.pyplot as plt
x = [0, 2, 4, 0, 2, 4, 0, 2, 4]
y = [0, 0, 0, 3, 3, 3, 7, 7, 7]
plt.scatter(x, y)
plt.show()
上绘制完全平行的线(例如photo)。以及如何在图表上隐藏x和y轴。我想绘制3层建筑的梁和柱的2D视图;是x,y
达到我的目标还是应该去其他图书馆?
答案 0 :(得分:0)
绝对matplotlib
可以做到这一点。看看他们的Rectangle Patch:
示例用法(您必须根据需要对其进行修改)
import matplotlib.pyplot as plt
import matplotlib.patches as patches
fig = plt.figure()
ax = fig.add_subplot()
rect = patches.Rectangle(
(0.1, 0.1),
0.5,
0.5,
fill=False
)
ax.add_patch(rect)
fig.show()