Reputation: 3515
I was trying to plot with matplotlib and xarray on Python 3.6.5.
My code is actually from the xarray documentation:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import xarray as xr
airtemps = xr.tutorial.open_dataset('air_temperature')
print(airtemps)
air = airtemps.air - 273.15
air.attrs = airtemps.air.attrs
air.attrs['units'] = 'deg C'
air1d = air.isel(lat=10, lon=10)
air1d.plot() # using xarray.DataArray's plot()
When I ran the code (within the virturlenv) it didn't show any plotting window and no error was thrown.
Upvotes: 0
Views: 1082