Makie.jl: scatter issue with largish range

Created on 25 Jan 2019  路  5Comments  路  Source: JuliaPlots/Makie.jl

The following works:

n = 100; rng = 100:110; Makie.scatter(rand(rng, n), rand(rng, n))

This doesn't plot any markers:

n = 100; rng = 1000:1100; Makie.scatter(rand(rng, n), rand(rng, n))

This is on Julia 1.0.2 on Windows with Makie v0.9.1.

Most helpful comment

What is the meaning of "markersize" if data ranges are different for x and y axis?

All 5 comments

you need to adapt the markersize which is currently in data units

I usually do
```julia
data = [rand(rng,n) rand(rng,n)]
ymin, ymax = extrema(data)
markersize = 0.01*(ymax-ymin)
Makie.scatter(data[:,1], data[:,2],markersize=markersize)
````
to get markers that have sizes spanning 1% of the data range.

What is the meaning of "markersize" if data ranges are different for x and y axis?

Maybe we should have a nonzero (though small) stroke by default so that this isn't a problem. With the very latest master, the following works, for example:

n = 100; rng = 1000:1100; Makie.scatter(rand(rng, n), rand(rng, n), strokewidth=0.5, strokecolor=:black)

This gives a fine black border of 0.5 of a pixel.

@mschauer good question. I believe it chooses the scale factor which makes the points the smallest.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SebastianM-C picture SebastianM-C  路  3Comments

mohamed82008 picture mohamed82008  路  6Comments

fa-bien picture fa-bien  路  3Comments

mschauer picture mschauer  路  4Comments

ashwani-rathee picture ashwani-rathee  路  6Comments