Skip to content

ax.step where parameter  #359

Closed
Closed
@austin-hoover

Description

@austin-hoover

Description

In ax.step, the 'where' parameter doesn't do anything in proplot.

Steps to reproduce

import numpy as np
import proplot as pplt

x = np.linspace(-5.0, 5.0, 11)
y = np.exp(-0.5 * x**2)

fig, axes = pplt.subplots(nrows=3, figsize=(4.0, 3.0), spany=False)
for ax, where in zip(axes, ['pre', 'post', 'mid']):
    ax.step(x, y, where=where, color='black', alpha=0.2)
    ax.scatter(x, y, color='black', marker='.')
    ax.format(ylabel=where)

pplt

Expected behavior: The where parameter should shift the locations of the steps.

Actual behavior: The where parameter does not shift the locations of the steps.

Equivalent steps in matplotlib

import numpy as np
from matplotlib import pyplot as plt

x = np.linspace(-5.0, 5.0, 11)
y = np.exp(-0.5 * x**2)

fig, axes = plt.subplots(nrows=3, figsize=(4.0, 3.0), sharex=True)
for ax, where in zip(axes, ['pre', 'post', 'mid']):
    ax.step(x, y, where=where, color='black', alpha=0.2)
    ax.scatter(x, y, color='black', marker='.')
    ax.set_ylabel(where)

plt

Proplot version

matplotlib=3.4.3
proplot=0.9.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions