Skip to content

xlabel disappears in scatter plots with subplots and colorbar #20455

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

Closed
javadnoorb opened this issue Mar 22, 2018 · 0 comments · Fixed by #21728
Closed

xlabel disappears in scatter plots with subplots and colorbar #20455

javadnoorb opened this issue Mar 22, 2018 · 0 comments · Fixed by #21728
Labels
Milestone

Comments

@javadnoorb
Copy link
Contributor

javadnoorb commented Mar 22, 2018

This is related to this PR #20446. Separating the subplot and single plots into two issues.

Copying from #20446:

def make_multiplots(numrows=2,numcols=2,sharey=True,sharex=True,PATCH_MODE_FLAG = True, is_scatter = True):
    fig, axes = pl.subplots(numrows,numcols,sharey=sharey,sharex=sharex )
    for i in range(axes.shape[0]):
        for j in range(axes.shape[1]):
            random_array = np.random.random((1000,3))
            df = pd.DataFrame(random_array,columns=['A label','B label','C label'])
            if is_scatter:
                df.plot.scatter('A label','B label',c='C label', PATCH_MODE_FLAG = PATCH_MODE_FLAG,ax=axes[i,j]);
            else:
                df.plot.hexbin('A label','B label',gridsize=20, PATCH_MODE_FLAG = PATCH_MODE_FLAG,ax=axes[i,j]);
            
            
make_multiplots(numrows=2,numcols=2,sharey=True, sharex=True, PATCH_MODE_FLAG = False, is_scatter=True);pl.suptitle('pandas current version');            
make_multiplots(numrows=2,numcols=2,sharey=True, sharex=True, PATCH_MODE_FLAG = True, is_scatter=True);pl.suptitle('patch fixing x-axis');            
make_multiplots(numrows=2,numcols=2,sharey=True, sharex=True, PATCH_MODE_FLAG = False, is_scatter=False);pl.suptitle('pandas current version');            
make_multiplots(numrows=2,numcols=2,sharey=True, sharex=True, PATCH_MODE_FLAG = True, is_scatter=False);pl.suptitle('patch fixing x-axis');  

image
image
image
image

@TomAugspurger TomAugspurger added the Visualization plotting label Mar 22, 2018
@TomAugspurger TomAugspurger added this to the Next Major Release milestone Mar 22, 2018
@jreback jreback modified the milestones: Next Major Release, 0.24.0 Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants