Aran
1
Hi there I have a streamlines plot that I have produced using Makie. I have plotted the streamlines using the following commands
fig_polar = Figure(resolution = (1000, 900))
ax2 = PolarAxis(
fig_polar[1, 1],
thetaticks = ((((0:15:90) .* pi) / 180))
)
streamplot!(f_trans, 1+dy..α-dy, 0+dx..pi/2-dx,colormap = :magma, gridsize=(30, 30), arrow_size=9,linewidth=0.8, title="x")
fig_polar
But I would like to only print the quarter circle is there a lims command for plotting only within a sector?
Any help much appreciated.
We didn’t implement this with the first version of polar axis. It would be good to have an issue for this on github so we can keep track of it easier.
You can mess around with internals to get there, but it won’t work interactively and you’ll have to fiddle with alignments to get them to not clip.
using LinearAlgebra
begin
fig_polar = Figure(resolution = (1000, 900))
ax2 = PolarAxis(fig_polar[1, 1], )
scatter!(ax2, 1 .+ rand(100), pi/2 .* rand(100))
lines!(ax2, 1.5 .+ 0.5 .* sin.(range(0, 6pi, length = 300)), range(0, pi/2, length = 300))
scatter!(ax2, Point2f(0, 1), color = :red)
let
view = ax2.scene.camera.view[]
scale = diag(view)[Vec(1,2)]
ws = widths(ax2.scene.px_area[])
pad = Vec2f(0.03)
trans = Vec3f((pad .- ws ./ maximum(ws))..., 0)
ax2.scene.camera.view[] = Makie.transformationmatrix(trans, Vec3f(2scale..., 1))
ax2.overlay.camera.view[] = Makie.transformationmatrix(trans, Vec3f(2, 2, 1))
ax2.overlay.plots[8].markersize[] = ax2.overlay.plots[8].markersize[] * 2
end
fig_polar
end
1 Like