Created
November 3, 2022 16:21
-
-
Save has2k1/ff455c7df8d5faab92e12990d33504eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from plotnine import * | |
df = pd.DataFrame({'x': range(5), 'y': range(5), 'z': list('ccddf')}) | |
df['z'] = pd.Categorical(df['z'], categories=list('cdf'), ordered=True) | |
p = (ggplot(df, aes('x', 'y', color='z')) | |
+ geom_point() | |
) | |
p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment