Skip to content

incorrect position of ylabel #373

@Yefee

Description

@Yefee

Description

When having 2 axes, the ylabel of top panel appears in the middle of the left figure.

Steps to reproduce

hydl = np.sin(2*np.arange(0, 60, 0.1))
vwsdl = np.cos(2*np.arange(0, 60, 0.1))

fig, axs = pplt.subplots(ncols=1, nrows=2)
axs[0].plot(hydl)
axs[1].plot(vwsdl)
axs[0].format(title='AA', titleweight='bold', ylabel='CC')
axs[1].format(title='BB', titleweight='bold', ylabel='DD')

Expected behavior:
CC appears at the left of top panel
DDappears at the left of bottom panel

Actual behavior:
CC appears in the middle
image

Equivalent steps in matplotlib

Please try to make sure this bug is related to a proplot-specific feature. If you're not sure, try to replicate it with the native matplotlib API. Matplotlib bugs belong on the matplotlib github page.

# your code here, if applicable
import matplotlib.pyplot as plt
fig, axs = plt.subplots(ncols=1, nrows=2)
axs[0].plot(hydl)
axs[0].set_ylim([-1.6, 1.6])
axs[1].plot(vwsdl)
axs[1].set_ylim([-2, 2])
axs[0].set_ylabel('CC')
axs[1].set_ylabel('DD')

image

Proplot version

import matplotlib; print(matplotlib.version); import proplot; print(proplot.version)
3.4.3
0.9.5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions