Comments (4)
I presume you do not want to read va from a column 'top' of your dataframe.
If so, you need to pass it outside of the aes.
from plotnine.
The docs on geom_text
specify to put it in the aes
field: https://plotnine.readthedocs.io/en/v0.12.4/generated/plotnine.geoms.geom_text.html#plotnine.geoms.geom_text
If I put the va="top"
in the geom_text
call, then all the text is place at the default location: "center".
from plotnine.
Each mapping can be either sourced from the underlying dataframe (with an 'aesthetic' = aes() call), or set to a constant value by being passed 'on the outside'.
See for example the label being set to the constant 'name' (below).
At least in my version (0.12.2), the text does shift:
from plotnine.
I see, I was confused about the meaning of the positions (i.e., "top" puts the label below the point). Thanks for helping out!
from plotnine.
Related Issues (20)
- `geom_smooth` doesn't apply `alpha` HOT 1
- Add palmers penguins data
- geom_boxblot width incorrect if number of subsets varies
- Specifying dpi option in theme does not work in quarto HOT 6
- break axis HOT 2
- Release: plotnine-0.13.5
- Named Reverse colormaps not available anymore HOT 1
- Strange behavior with geom_label() using boxstyle other than default (round) exept for round4
- Bug after changing order of factors on facet_grid HOT 1
- Release: plotnine-0.13.6
- Please loosen the restrictions on theme(figure_size=( , )) HOT 2
- Using theme_matplotlib() fails with `'object' object has no attribute 'startswith'` HOT 1
- Create doc similar to ggplot2 aes specification page HOT 1
- Change color of only one x axis label - plotnine HOT 3
- 2024 Plotnine Contest
- geom_text: family aesthetic does not seem to use mappings HOT 1
- Passing None an aes color mapping value raises error
- Support for custom linetypes
- Include geodatasets example in geom_map reference page
- Add bounds argument to `geom_density` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plotnine.