-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
image trace type #4289
image trace type #4289
Conversation
This comment has been minimized.
This comment has been minimized.
@etpinard It's ready for a first round of review ! |
'For example, for the `rgba` colormodel, the default value is [255, 255, 255, 1].' | ||
].join(' ') | ||
}, | ||
x0: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So no x
and y
for this iteration? Is that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, this wasn't a requirement for that iteration so I did not include it. For your information, most other libraries do not support this either. It is usually assumed that an image is made of pixels of identical size arranged in a regular fashion as in a square crystal lattice. I'd be surprised if users ask for x
and y
but we'll see 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x0
and dx
seem enough for a v1... any obvious cases where that wouldn't be enough? @jonmmease @emmanuelle @alexcjohnson ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I'm also very much ok with not implementing x
and y
in this iteration.
Very nicely done @antoinerg 🎉 - I think you found the perfect way to get this new trace type out fast with solid performance and not much brittle logic. Thank you very much for that! I made a few comments - none of them should be difficult to resolve. I'll add one more comment here:
|
Oh and one more thing @antoinerg: I didn't notice any funky CSS tricks like you had in one of your proof-of-concepts. I guess you decide to not go down that route, can you confirm? |
I confirm that I ⚡ the CSS trick I had in my proof of concept. If you want me to, I could add a few comments/references about CSS image-rendering: pixelated which could potentially be used in the future to speed up rendering on browsers that support it (almost all of them except Safari and potentially SVG editors like Illustrator/Inkscape). I decided not to go that route because it's a bit unsafe and would require manually testing all the different browsers we want to support... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Great, all my comments have been resolved. Awesome work @antoinerg !! PSA: we're picking 💃 💃 💃 |
I am with you @etpinard: I'm not a big fan of |
Me too! |
Fantastic stuff. Any plans of updating the docs? At the moment i'm using the demo for guidance |
This PR introduces a new
image
trace type to display images on cartesian axes and closes #3898Codepen showing the different mocks: https://codepen.io/antoinerg/pen/OJJPxJK
Quick overview:
rgb
,rgba
,hsl
andhsla
).zmin
andzmax
Todo:
z
array with missing values (ie. columns with shorter length) (done in 15c06fa)To discuss:
image
~~decide the trace's name. ~~ Scroll down below to read different points of view on the matter. Here's a compiled a list of candidates:image
raster
rasterimage
pixmap
imshow