Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boxpctiles does not draw boxes #382

Closed
AWSisco opened this issue Aug 10, 2022 · 1 comment
Closed

boxpctiles does not draw boxes #382

AWSisco opened this issue Aug 10, 2022 · 1 comment
Labels

Comments

@AWSisco
Copy link

AWSisco commented Aug 10, 2022

Description

I think there's a minor bug when adding on-the-fly box plots to scatter, line, and bar charts. boxpctile works as expected, but the equivalent boxpctiles has no effect.

Steps to reproduce

import proplot as pplt
import numpy as np
import pandas as pd

data = np.full((100,10),fill_value=np.nan)  

np.random.seed(1999)
mu = np.random.randint(10,21,10)
sigma = np.random.randint(1,5,10)

for i in range(0,10):
    data[:,i] = np.random.normal(mu[i],sigma[i],100)

data = pd.DataFrame(data)

fig, axs = pplt.subplots(ncols=2, aspect=(1.5,1))

axs[0].bar(data, medians=True, barpctile=(5,95), boxpctile=True, ec='k', c='yellow5')
axs[1].bar(data, medians=True, barpctile=(5,95), boxpctiles=True, ec='k', c='yellow5') #No boxes appear here

boxes

Proplot version

matplotlib=3.5.2
proplot=0.9.5.post332

@lukelbd
Copy link
Collaborator

lukelbd commented Mar 29, 2023

Thanks for the report. This was indeed a bug -- just a typo (fixed by f6cc8b9). New result:

import proplot as pplt
import numpy as np
import pandas as pd

data = np.full((100,10),fill_value=np.nan)  

np.random.seed(1999)
mu = np.random.randint(10,21,10)
sigma = np.random.randint(1,5,10)

for i in range(0,10):
    data[:,i] = np.random.normal(mu[i],sigma[i],100)

data = pd.DataFrame(data)

fig, axs = pplt.subplots(ncols=2, aspect=(1.5,1))

axs[0].bar(data, medians=True, barpctile=(5,95), boxpctile=True, ec='k', c='yellow5')
axs[1].bar(data, medians=True, barpctile=(5,95), boxpctiles=True, ec='k', c='yellow5') #No boxes appear her

iTerm2 RcTj0Y tmphy23eujc

@lukelbd lukelbd added the bug label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants