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

Can we use images as marks? #307

Open
jama1017 opened this issue Jul 30, 2024 · 1 comment
Open

Can we use images as marks? #307

jama1017 opened this issue Jul 30, 2024 · 1 comment

Comments

@jama1017
Copy link

jama1017 commented Jul 30, 2024

Hi!

Thanks so much for creating this great library. I wonder if it's possible to use images as marks in plots, like this example in Vega-lite: https://vega.github.io/vega-lite/docs/image.html#examples

@entronad
Copy link
Owner

entronad commented Aug 1, 2024

Yes, in Graphic, Mark only determines how it is located, Shape determines how it is rendered. For the vega example, you can use a Point Mark, and write your own Shape, like this example:

class TriangleShape extends IntervalShape {

shape: ShapeEncode(value: TriangleShape()),

In your Shape subclass, you can render ImageElements

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

2 participants