Giter Club home page Giter Club logo

Comments (11)

SimonDanisch avatar SimonDanisch commented on May 23, 2024

It would be nice to use Strings as markers in scatter.

What would you expect that to do? Basically annotations?

to_spritemarker(b, marker::Vector{Char}) = String(marker)

That's an artifact from text rendering bein pretty much a scatter plot of chars.

from makie.jl.

mschauer avatar mschauer commented on May 23, 2024

What would you expect that to do? Basically annotations?

Yes

That's an artifact from text rendering bein pretty much a scatter plot of chars.

Ah, I see were the problem comes from.

from makie.jl.

SimonDanisch avatar SimonDanisch commented on May 23, 2024

A nicer way of not converting the marker to a string, would be to allow Union{String, Vector{Char} in the actual rendering code in GLVisualize....

Annotations are pretty much implemented in GLVisualize, I just need to wrap the function and export it in Makie :)

from makie.jl.

mschauer avatar mschauer commented on May 23, 2024

Yes, allowing that in GLVisualize would be best. Still I think there is a bug here:
https://github.com/SimonDanisch/Makie.jl/blob/2386fb3b8b9784b649c6aca2e5c90f527b43e314/src/plotsbase/converts.jl#L344 gives problems. If you have e.g. a vector of Symbols, that gets converted into a vector of chars, which then is converted into a string in L344, which does not make sense.

from makie.jl.

SimonDanisch avatar SimonDanisch commented on May 23, 2024

Why not? Symbols are just a stand in for unicode characters, and a bunch of unicode characters are represented as a string ;)

from makie.jl.

mschauer avatar mschauer commented on May 23, 2024

The issue in short:

 scatter(GeometryTypes.Point3f0[(1,0,0), (0,1,0), (0,0,1)], marker=[:x, :circle, :cross])
ERROR: MethodError: no method matching to_spritemarker(::Makie.Scene{:makie}, ::String)

from makie.jl.

SimonDanisch avatar SimonDanisch commented on May 23, 2024

Ahhh, sorry, since you never mentioned that it actually errors, I was a bit slow to follow ;)

from makie.jl.

mschauer avatar mschauer commented on May 23, 2024

slow

That was mutual, it took me also to figure out that it actually should work.

from makie.jl.

SimonDanisch avatar SimonDanisch commented on May 23, 2024

Oh, well no wonder why i didn't see the problem with it - the conversion code is correct, but I don't have the scatter code setup to actually deal with strings for multiple markers :D

from makie.jl.

SimonDanisch avatar SimonDanisch commented on May 23, 2024

Okay this should be fixed on GLVisualize master and this branch: #24

from makie.jl.

mschauer avatar mschauer commented on May 23, 2024

Works!

from makie.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.