Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marker_z doesn't seem to be passed correctly in scatter plots of geometry #109

Open
evetion opened this issue Aug 27, 2023 · 2 comments
Open

Comments

@evetion
Copy link
Member

evetion commented Aug 27, 2023

Might extend to many other geometries/attributes.

Plotting of points with a color doesn't seem to work.

using GeoInterface, ArchGDAL, Plots
geom = ArchGDAL.createpoint.(rand(10), rand(10))
plot(geom, seriestype=:scatter, marker_z=rand(10))
Screenshot 2023-08-27 at 14 43 20

If we bypass our recipe however, we get colors

plot(Tuple.(GeoInterface.coordinates.(geom)), seriestype=:scatter, marker_z=rand(10))
Screenshot 2023-08-27 at 14 43 34

Also note that a label is now automatically added.

@evetion
Copy link
Member Author

evetion commented Aug 27, 2023

Hmm, if I pass a label to the first plot, you get 10 labels, implicating our recipes is sending 10 series of a single(?) point to the backend.

edit: If you pass a matrix as colors, like marker_z=rand(1,10), you do end up with different colors.

@evetion
Copy link
Member Author

evetion commented Aug 28, 2023

Relates to JuliaPlots/Plots.jl#3880

Simple fix passing colors as an adjoint:
plot(geom, seriestype=:scatter, marker_z=rand(10)')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant