I am trying to project meteorological data from a netcdf4 file with its latitude and longitude information and I am not getting how to show lat-long information on the x and y-axis, in the image instead of index values.

[![enter image description here](https://i.stack.imgur.com/rdJrw.png)](https://i.stack.imgur.com/rdJrw.png)

Here is the code I have written:

```
import gdal
import matplotlib.pyplot as plt
# Path of netCDF file
netcdf_fname = "F:\TS\d02_2021-03-31_000000.nc"
# Specify the layer name to read
layer_name = "mcape"
# Open netcdf file.nc with gdal
ds = gdal.Open("NETCDF:{0}:{1}".format(netcdf_fname, layer_name))
# Read full data from netcdf
data = ds.ReadAsArray(0, 0, ds.RasterXSize, ds.RasterYSize)
data[data < 0] = 0

A = data[4,:,:]
D = plt.imshow(A)
plt.colorbar(D)
plt.title('mcape',fontweight ="bold")
plt.show()

```