Skip to content

More flexible ggsize() #300

@ASmirnov-HORIS

Description

Sometimes I only need to restrict the width of my plot. But I can only specify either both parameters or none, but cannot just change one of them. Here is one case example:

import pandas as pd

from lets_plot import *
LetsPlot.setup_html()

df = pd.read_csv('https://raw.githubusercontent.com/HIL-HK/lets-plot-examples/master/data/mpg.csv')

ggplot(df.sort_values(by=['cyl', 'year'])) + \
    geom_point(aes(x='cty', y='hwy')) + \
    facet_grid(x='year', y='cyl') + \
    ggsize(600, 800) # Better: ggsize(width=600)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions