xrviz icon indicating copy to clipboard operation
xrviz copied to clipboard

Incorrect time series plot when `extract along` passed in `initial_params`

Open hdsingh opened this issue 4 years ago • 2 comments

Time series extraction works fine, however upon specifying the extract along parameter in initial_params it produces constant straight line graph.

For temporary basis, this problem could be solved by de-selecting and re-selecting the extract along dimension, but it would be good to have a permanent solution.

Screenshot from 2019-11-27 07-38-20

Reproducible code:

import xarray as xr
from xrviz.dashboard import Dashboard

# open remote data with xarray
url = 'http://opendap.co-ops.nos.noaa.gov/thredds/dodsC/NOAA/LOOFS/MODELS/201907/glofs.loofs.fields.forecast.20190720.t06z.nc'
data = xr.open_dataset(url)

initial_params = {# Select Variable
                  'Variables': 'temp',

                  # Set Coords
                  'Set Coords': ['lat', 'lon'],

                  # Axes
                  'x': 'lon',
                  'y': 'lat',
                  'sigma': 'animate',
                  'extract along':'time',

                  # Style
                  'height': 300,
                  'width': 650,
                  'colorbar': True,
                  'cmap': 'Viridis',

                  # Projection
                  'is_geo': True,
                  'basemap': 'OSM',
                  'crs': 'PlateCarree',
                  'projection': 'Orthographic',
                  'crs params': "{'central_longitude': 0.0}",
                  'projection params': "{'central_longitude': -78, 'central_latitude': 43, 'globe': {'ellipse':'sphere'}}"
                  }
dash = Dashboard(data, initial_params=initial_params)
dash.panel

This might be due to improper sequence of initialisation of relevant events (not so sure).

hdsingh avatar Nov 27 '19 02:11 hdsingh