gpt4 book ai didi

octave - 如何使用 Octave 更改极坐标图中的标记样式?

转载 作者:行者123 更新时间:2023-12-05 02:30:26 30 4
gpt4 key购买 nike

我正在尝试更改 octave 中的polar 图中标记的外观

r = rand(1,10); % the radius
t = 30*rand(1,10); % the angles
polar(t,r,'o') % the plot

看来我们只能通过用“s”或其他方式替换“o”来改变形状。但是,我没有找到改变标记的大小和颜色的方法。有人有想法吗?

提前致谢。最好的,

最佳答案

可以通过极坐标 handle :

h = polar(t,r,'o')
% list all graphical properties for this object
get(h)
set(h,'marker','v', 'markerfacecolor','g', 'markersize',10)

产量

>> h = polar(t,r,'o') % the plot
h = -64.073
>> get(h)
ans =
scalar structure containing the fields:
beingdeleted = off
busyaction = queue
buttondownfcn = [](0x0)
children = [](0x1)
clipping = on
createfcn = [](0x0)
deletefcn = [](0x0)
handlevisibility = on
hittest = on
interruptible = on
parent = -69.944
pickableparts = visible
selected = off
selectionhighlight = on
tag =
type = line
uicontextmenu = [](0x0)
userdata = [](0x0)
visible = on
color =
0 0.4470 0.7410
displayname =
linejoin = round
linestyle = none
linewidth = 0.5000
marker = o
markeredgecolor = auto
markerfacecolor = none
markersize = 6
xdata =
Columns 1 through 6:
0.978470 -0.060967 -0.436276 -0.268739 0.441890 -0.586862
Column 7 through 10:
0.746687 -0.063825 0.368511 0.271495
xdatasource =
ydata =
Columns 1 through 6:
0.049178 -0.426698 0.380388 -0.101611 -0.699609 -0.266804
Column 7 through 10:
0.383766 -0.903458 0.764035 -0.126044
ydatasource =
zdata = [](0x0)
zdatasource =

>> set(h,'marker','v', 'markerfacecolor','g', 'markersize',10)

enter image description here

关于octave - 如何使用 Octave 更改极坐标图中的标记样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71857903/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com