Skip to content

raise AttributeError(f"{type(self).__name__!r} object " AttributeError: 'QuadMesh' object has no property 'cbar'  #6218

@haritha1022

Description

@haritha1022

What happened?

I was trying to plot panel plots
but the cbar is not removing

raise AttributeError(f"{type(self).__name__!r} object " AttributeError: 'QuadMesh' object has no property 'cbar' 

What did you expect to happen?

I am unable to remove the color bar
I want to remove the color bar

Minimal Complete Verifiable Example

import xarray as xr
import cartopy.crs as ccrs
from cartopy import feature as cf
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
#Opening and reading data
data=xr.open_dataset("uvg.nc")

print(data)
def main():
  x=data.longitude[::5];
  y=data.latitude[::5]
  u=data.u[5,::5,::5];
  v=data.v[5,::5,::5]
  z=data.z[5]
  ax1 = plt.subplot(3,2,1,projection=ccrs.PlateCarree())
  z.plot.pcolormesh(cmap="turbo",vmin=7500,vmax=8500, ax = ax1,cbar=False)
  ax1.set_extent([60, 100, 38, 0])
  ax1.coastlines()

ax1.quiver(x,y,u,v, angles='xy', scale_units='xy', scale=4)
plt.show()

Relevant log output

raise AttributeError(f"{type(self).__name__!r} object " AttributeError: 'QuadMesh' object has no property 'cbar'

Anything else we need to know?

No response

Environment

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