朱莉娅散点图中的尺寸和颜色

发布于 2025-01-23 16:45:16 字数 372 浏览 3 评论 0原文

我想创建一个散点图。我在其他变量(向量)中具有点大小和颜色。

x = Float64.(1:10)
y = Float64.(1:10)
c = Float64.(1:10)
s = Float64.(1:10)

scatter(x,y)

我已经很久了,我一直在谷歌搜索,找不到正确的答案。我正在寻找的是:

”在此处输入图像说明”

I want create a scatter plot. I have point size and colour in additional variables (vectors).

x = Float64.(1:10)
y = Float64.(1:10)
c = Float64.(1:10)
s = Float64.(1:10)

scatter(x,y)

I've been googling very long now and could not find the right answer. What I am looking for is this:

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟若柳尘 2025-01-30 16:45:16

这应该使您成为其中的一部分:

x = 1.0:10.0
y = 1.0:10.0
c = 1.0:10.0
s = 1.0:10.0

theme(:ggplot2)
scatter(x, y; zcolor=c, markersize=s, color=:oslo)

我没有时间尝试找出传奇。

有几乎无限的颜色化学数量,如果这个颜色数字不正确,请在这里查看: https://docs.juliaplots.org/latest/generated/colorschemes/

This should get you part of the way there:

x = 1.0:10.0
y = 1.0:10.0
c = 1.0:10.0
s = 1.0:10.0

theme(:ggplot2)
scatter(x, y; zcolor=c, markersize=s, color=:oslo)

I didn't have time to try to figure out the legends.

enter image description here

There are a nearly unlimited number of colorschemes, have a look here if this one isn't exactly right: https://docs.juliaplots.org/latest/generated/colorschemes/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文