-
Notifications
You must be signed in to change notification settings - Fork 228
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
Is there a way to add images onto the x axis? #817
Comments
There isn't an easy way to do it. If/when we make it possible, we would want it to be much simpler than Please post some examples (examples, mockups, etc) of what you want to do, they will help when working on the feature. |
Thanks for the quick reply! Sure, following is a minimum working example and what I want to be able to do
This gives the following graph But instead I would want to be able to generate a graph similar to Just to make it easier to work on and consolidated here the links to the country flag images that work with my above example: Canada Using images directly from hyperlinks would be cool but ideally I want to use custom images stored locally. I also believe ggplot2 has this functionality via the ggtext package as shown in the second example of this link: On a side note: you mentioned there is not an easy way but is any way possible for the time being even if somewhat convoluted to achieve this? Would love for any guidance towards implementing something similar with the current combination of plotnine and matplotlib packages Thanks again! |
Workaround, you can do it like this: I my example you need country flag image files with .jpg in the same directory. (Sorry, I didn't care about optics)
|
See also my Issue: #869 |
and of course you can use .png too |
I see thanks for the work around I managed to do what I wanted |
Basically title. Is there a way within plot nine to add images in place of labels to the x axis tick positions?
I know you can get the matplotlib figure and axis using
.draw()
and matplotlib has this functionality usingOffsetImage()
but I am having a hard time actually implementing this.Any help would be greatly appreciated
The text was updated successfully, but these errors were encountered: