Skip to content

Incorrect time series plot when extract along passed in initial_params #60

@hdsingh

Description

@hdsingh

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions