Hello,
I am trying to create a streamplot
in Makie with a log scale axis. I am trying to control the number of lines in the plot using the gridsize
argument. However, because of my logarithmic scaling, I am having some trouble getting the plots to look nice. Here is a minimal (not) working example:
# Make fig
fig = Figure()
# Make axis
ax = Axis(fig[1, 1], xscale = log10)
# Some system of differential equation to plot
function mySystem(x)
return Point2f((x[1] - 1)^2*x[2], x[2]*x[1])
end
# Add streamplot
streamplot!(
ax,
mySystem,
(1, 10),
(1, 10),
gridsize = (20, 10),
maxsteps = 10,
stepsize = 0.01,
)
# Show plot
fig
This gives the following figure (granted this is not a very interesting example, but hopefully it illustrates the intention ):
Is there a way to specify somehow to use a logarithmic scale for the gridsize?
As you can see, the arrows are rather compressed to the right of the plot. I would like to have them spread out uniformly in space.
The quickest hack I could think of would be to rescale the equations directly and then change the tick labels, but would be a bit more convenient to have a control directly over the representation of the data.
Perhaps I am going about this wrong, as I am rather new to Makie! Feel free to correct me if there is a more standard way of making streamplots!
Thanks in advance!