Engee 文档

该页面正在翻译中。

pie(values; kwargs...)
pie(point, values; kwargs...)
pie(x, y, values; kwargs...)

从给定的创建饼图 价值.

绘图类型

绘图类型别名 功能是 .

例子:

</无翻译>

using CairoMakie
data   = [36, 12, 68, 5, 42, 27]
colors = [:yellow, :orange, :red, :blue, :purple, :green]

f, ax, plt = pie(data,
                 color = colors,
                 radius = 4,
                 inner_radius = 2,
                 strokecolor = :white,
                 strokewidth = 5,
                 axis = (autolimitaspect = 1, )
                )

f
1b542a2

</无翻译>

using CairoMakie
f, ax, plt = pie([π/2, 2π/3, π/4],
                normalize=false,
                offset = π/2,
                color = [:orange, :purple, :green],
                axis = (autolimitaspect = 1,)
                )

f
87c3d2b

</无翻译>

using CairoMakie
fig = Figure()
ax = Axis(fig[1, 1]; autolimitaspect=1)

kw = (; offset_radius=0.4, strokecolor=:transparent, strokewidth=0)
pie!(ax, ones(7); radius=sqrt.(2:8) * 3, kw..., color=Makie.wong_colors(0.8)[1:7])

vs = [2, 3, 4, 5, 6, 7, 8]
vs_inner = [1, 1, 1, 1, 2, 2, 2]
rs = 8
rs_inner = sqrt.(vs_inner ./ vs) * rs

lp = Makie.LinePattern(; direction=Makie.Vec2f(1, -1), width=2, tilesize=(12, 12), linecolor=:darkgrey, background_color=:transparent)
# draw the inner pie twice since `color` can not be vector of `LinePattern` currently
pie!(ax, 20, 0, vs; radius=rs_inner, inner_radius=0, kw..., color=Makie.wong_colors(0.4)[eachindex(vs)])
pie!(ax, 20, 0, vs; radius=rs_inner, inner_radius=0, kw..., color=lp)
pie!(ax, 20, 0, vs; radius=rs, inner_radius=rs_inner, kw..., color=Makie.wong_colors(0.8)[eachindex(vs)])

fig
┌ Warning: LinePattern(background_color = ...) has been deprecated in favor of LinePattern(backgroundcolor = ...)\n
└ @ Makie ~/work/package/Makie.jl/src/patterns.jl:75
6c8cf58

</无翻译>

using CairoMakie
fig = Figure()
ax = Axis(fig[1, 1]; autolimitaspect=1)

vs = 0:6 |> Vector
vs_ = vs ./ sum(vs) .* (3/2*π)
cs = Makie.wong_colors()
Δx = [1, 1, 1, -1, -1, -1, 1] ./ 10
Δy = [1, 1, 1, 1, 1, -1, -1] ./ 10
Δr1 = [0, 0, 0.2, 0, 0.2, 0, 0]
Δr2 = [0, 0, 0.2, 0, 0, 0, 0]

pie!(ax, vs; color=cs)
pie!(ax, 3 .+ Δx, 0, vs; color=cs)
pie!(ax, 0, 3 .+ Δy, vs; color=cs)
pie!(ax, 3 .+ Δx, 3 .+ Δy, vs; color=cs)

pie!(ax, 7, 0, vs; color=cs, offset_radius=Δr1)
pie!(ax, 7, 3, vs; color=cs, offset_radius=0.2)
pie!(ax, 10 .+ Δx, 3 .+ Δy, vs; color=cs, offset_radius=0.2)
pie!(ax, 10, 0, vs_; color=cs, offset_radius=Δr1, normalize=false, offset=π/2)

派!(ax,Point2(0.5,-3),vs_;color=cs,offset_radius=Δr2,normalize=false,offset=π/2)
派!(ax,Point2.(3.5, -3 .+Δy),vs_;color=cs,offset_radius=Δr2,normalize=false,offset=π/2)
派!(ax,Point2.(6.5 .+Δx,-3),vs_;color=cs,offset_radius=Δr2,normalize=false,offset=π/2)
派!(ax,Point2.(9.5 .+Δx,-3.+Δy),vs_;color=cs,offset_radius=Δr2,normalize=false,offset=π/2)

派!(ax,0.5,-6,vs_;inner_radius=0.2,color=cs,offset_radius=0.2,normalize=false,offset=π/2)
派!(ax,3.5,-6.+Δy,vs_;inner_radius=0.2,color=cs,offset_radius=0.2,normalize=false,offset=π/2)
派!(ax,6.5。+Δx,-6,vs_;inner_radius=0.2,color=cs,offset_radius=0.2,normalize=false,offset=π/2)
派!(ax,9.5。+Δx,-6.+Δy,vs_;inner_radius=0.2,color=cs,offset_radius=0.2,normalize=false,offset=π/2)

无花果
672c849

属性

夹式飞机

默认值为 自动的

剪辑平面提供了一种在3D空间中进行剪辑的方法。 您可以设置最多8个向量 平面3f 飞机在这里,后面的情节将被裁剪(即变得不可见)。 默认情况下,剪辑平面继承自父绘图或场景。 您可以删除父 夹片机 通过传递 平面3f[].

颜色

默认值为 :灰色

没有可用的文档。

depth_换档

默认值为 0.0

在所有其他变换之后(即在剪辑空间中)调整绘图的深度值,其中 0<=深度<=1. 这仅适用于GLMakie和WGLMakie,可用于调整渲染顺序(如可调谐透绘)。

外汇管理局

默认值为 真的

调整是否使用fxaa(抗锯齿,仅限GLMakie)渲染绘图。

内尔*拉迪乌斯

默认值为 0

饼段的内半径。 如果这大于零,饼片就会变成环形部分。

可检查的

默认值为 @继承inspectable

设置此图是否应由 数据探测仪. 默认值取决于父场景的主题。

检查员-检查员

默认值为 自动的

设置回调函数 (检查员,情节)->。.. 用于清理DataInspector中的自定义指标。

检查员-检查员

默认值为 自动的

设置回调函数 (检查员,情节,索引)->。.. 它取代了默认值 显示_数据 方法。

检查器_label

默认值为 自动的

设置回调函数 (绘图、索引、位置)->字符串 它替换了DataInspector生成的默认标签。

模型

默认值为 自动的

为绘图设置模型矩阵。 这将复盖使用 翻译!, 旋转!规模!.

正常化

默认值为 真的

如果 真的,将所有值的和归一化为2π(一整圆)。

偏移量

默认值为 0

第一个饼图段与(1,0)矢量的角度偏移(以弧度为单位)。

[医]外行

默认值为 0

每个饼图段沿半径距中心的偏移量

透支

默认值为 错误

控制绘图是否将绘制在其他绘图上。 这具体意味着忽略GL后端中的深度检查

半径

默认值为 1

饼段的外半径。

空间

默认值为 :数据

设置包含情节的盒子的变换空间。 见 麦琪空间() 供可能的输入。

ssao

默认值为 错误

调整是否使用ssao(屏幕空间环境光遮蔽)渲染绘图。 请注意,这仅在3D绘图中有意义,并且仅适用于 fxaa=真.

[医]斯特罗克色

默认值为 :黑色

没有可用的文档。

斯特罗克威德斯

默认值为 1

没有可用的文档。

转型

默认值为 :自动

没有可用的文档。

透明度

默认值为 错误

调整情节处理透明度的方式。 在GLMakie 透明度=真 导致使用顺序独立的透明度。

vertex_per_deg

默认值为 1

控制有多少个多边形顶点用于一个旋转度。

可见

默认值为 真的

控制是否渲染绘图。