Skip to content

strange things happen when using .draw() #1009

@TerryGamon

Description

@TerryGamon

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:

Image

now using:

fig=p.draw(show=False)
p.show()

Image

the behaviour is different, sometimes it hides the whole x and y axis sometimes just parts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions