Fork me on GitHub

ggplot from ŷhat


geom_step

Usage

geom_step(position = 'identity', stat = 'identity')

Arguments

Name Description
position Position adjustments to points. identity
stat The statistical transformation to use on the data for this layer. identity

Aesthetics

import numpy as np
import pandas as pd

df = pd.DataFrame({
    "x": range(100),
    "y": np.random.choice([-1, 1], 100)
})
df.y = df.y.cumsum()

ggplot(df, aes(x='x', y='y')) +\
    geom_point()
ggplot(df, aes(x='x', y='y')) +\
    geom_step()