0

I am reading a NetCDF file in my code, in which I am printing and plotting the values of a particular variable. The MWE code is given by

import numpy as np                                  
from matplotlib import pyplot as plt                
import time, sys, math, os                          
from multiprocessing import Pool                    
from multiprocessing import Process                 
from scipy.interpolate import LSQUnivariateSpline   
from scipy.interpolate import UnivariateSpline      
import bisect                                       
import random                                       
from scipy.stats.stats import pearsonr              
                                                    
from scipy.io import netcdf                         
from netCDF4 import Dataset         

input_dir = 'Data/input'                

input_data  = f'{input_dir}/input_data.nc'        
ncfile      = Dataset(input_data,'r')              
print(input_data)                                  
corr11      = np.array(ncfile['corr11'  ][:,:,:,:])
ncfile.close()
    
print(corr11[36,36,0,1:])

plt.figure(1)                                                               
plt.plot(xvalue[1:], corr11[36,36,0,1:],color ='olive', label= '$A_{t1}$') 
plt.show()

The output for print is [1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1..................1.]. The xvalue is in the range (0,805)

The output for the plot is given by

Matplotlib output

I don't understand the values (1e-12+1) in the y-axis. Any help in making the plot understandable is deeply appreciated.

Thanks in advance

tdy
  • 26,545
  • 9
  • 43
  • 50
Rakesh
  • 1
  • 1
    Does this answer your question? [prevent scientific notation in matplotlib.pyplot](https://stackoverflow.com/questions/28371674/prevent-scientific-notation-in-matplotlib-pyplot) – BigBen Jul 23 '21 at 13:55

0 Answers0