Hello,
I’m trying to use CairoMakie to plot some data, but there is no output or error message for my plotting. I have tried my best to reduce my problem to a MWE, but since I’m working with a particular set of data, this is difficult (coming from integrating some differential equations)…
If I run this code, I get no plot, and no error message… which makes it difficult to debug.
fig = Figure(size = (1000, 300))
data = loadData()
ax = Axis(fig[1, 1], limits = (0, 2, 0, 2))
x = log10.(data[2, :])
y = log10.(data[1, :])
c = 1:length(x)
lines!(ax, x, y; color = c)
fig
The problem disappears after removing some elements. Namely, a plot is produced if, while keeping everything else the same, I do one of the following:
- remove the
color
kwarg in thelines!
method - remove the
limits
argument in theAxis
method - remove the
log10
function on one of the sets of data
For example, removing the limits
argument works just fine:
I am very puzzled by this outcome. Maybe there is something I am overlooking? What does it mean for Makie to output nothing?
I thought that maybe the data was weird, and it was causing some issue when plotting, but this is what I am trying to plot:
fig = Figure()
ax1 = Axis(fig[1, 1])
ax2 = Axis(fig[2, 1])
lines!(ax1, log10.(data[1, :]))
lines!(ax2, log10.(data[2, :]))
fig
Which does not seem pathological. I have not managed to reproduce this with some other data. But perhaps someone knows what is causing this issue.
Anything helps!
Thanks!