strange things happen when using .draw()
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 4.8k
- Forks
- 254
- Avg merge
- 10h 35m
- Merged PRs (30d)
- 9
Description
I am not sure what is going on and if it is even a bug or side effekt, but .draw() does strange things:
import pandas as pd
import numpy as np
import plotnine as p9
dates = pd.date_range(start='2023-01-01', periods=10)
values = np.random.rand(10)
df = pd.DataFrame({'date': dates, 'value': values})
p=(p9.ggplot(df)
+p9.geom_line(p9.aes(x='date',y='value'))
)
p.show()
so far so good:
now using:
fig=p.draw(show=False)
p.show()
the behaviour is different, sometimes it hides the whole x and y axis sometimes just parts
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided pandas, NumPy, and plotnine example, comparing p.show() with p.draw(show=False) followed by p.show(). Inspect the drawing and display path that handles these two calls; done means the axes render consistently instead of hiding the whole or partial x and y axes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, pandas, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100