html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/3138#issuecomment-512608717,https://api.github.com/repos/pydata/xarray/issues/3138,512608717,MDEyOklzc3VlQ29tbWVudDUxMjYwODcxNw==,2599958,2019-07-17T23:42:27Z,2019-07-17T23:42:27Z,NONE,"I posted an issue to hvplot.xarray ( https://github.com/pyviz/hvplot/issues/244) where hvplot does *not* do the right thing. But matplotlib (and hence also xarray.plot) do the right thing. On Wed, Jul 17, 2019 at 6:40 PM Deepak Cherian wrote: > Thanks @hetland > , > good to see you here. > > I think this is probably easy to fix by using xr.broadcast to broadcast > things before extracting the numpy arrays. Can you send in a PR? > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . > -- Prof. Rob Hetland Texas A&M Univ. – Dept. of Oceanography http://pong.tamu.edu/~rob ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,469344355 https://github.com/pydata/xarray/issues/3138#issuecomment-512608182,https://api.github.com/repos/pydata/xarray/issues/3138,512608182,MDEyOklzc3VlQ29tbWVudDUxMjYwODE4Mg==,2448579,2019-07-17T23:40:03Z,2019-07-17T23:40:03Z,MEMBER,"Thanks @hetland, good to see you here. I think this is probably easy to fix by using `xr.broadcast` to broadcast things before extracting the numpy arrays. Can you send in a PR? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,469344355 https://github.com/pydata/xarray/issues/3138#issuecomment-512591623,https://api.github.com/repos/pydata/xarray/issues/3138,512591623,MDEyOklzc3VlQ29tbWVudDUxMjU5MTYyMw==,1217238,2019-07-17T22:26:47Z,2019-07-17T22:26:47Z,MEMBER,"Thanks for the report. I *think* should be relatively straightforward to fix, assuming that the underlying maptlotlib plotting functions handle 2D coordinates. For reference, here's the full error traceback: ``` ValueError Traceback (most recent call last) in () ----> 1 ds.data[0].plot.pcolormesh(x='x', y='zt') 3 frames /usr/local/lib/python3.6/dist-packages/xarray/plot/plot.py in plotmethod(_PlotMethods_obj, x, y, figsize, size, aspect, ax, row, col, col_wrap, xincrease, yincrease, add_colorbar, add_labels, vmin, vmax, cmap, colors, center, robust, extend, levels, infer_intervals, subplot_kws, cbar_ax, cbar_kwargs, xscale, yscale, xticks, yticks, xlim, ylim, norm, **kwargs) 697 for arg in ['_PlotMethods_obj', 'newplotfunc', 'kwargs']: 698 del allargs[arg] --> 699 return newplotfunc(**allargs) 700 701 # Add to class _PlotMethods /usr/local/lib/python3.6/dist-packages/xarray/plot/plot.py in newplotfunc(darray, x, y, figsize, size, aspect, ax, row, col, col_wrap, xincrease, yincrease, add_colorbar, add_labels, vmin, vmax, cmap, center, robust, extend, levels, infer_intervals, colors, subplot_kws, cbar_ax, cbar_kwargs, xscale, yscale, xticks, yticks, xlim, ylim, norm, **kwargs) 583 # check if we need to broadcast one dimension 584 if xval.ndim < yval.ndim: --> 585 xval = np.broadcast_to(xval, yval.shape) 586 587 if yval.ndim < xval.ndim: /usr/local/lib/python3.6/dist-packages/numpy/lib/stride_tricks.py in broadcast_to(array, shape, subok) 180 [1, 2, 3]]) 181 """""" --> 182 return _broadcast_to(array, shape, subok=subok, readonly=True) 183 184 /usr/local/lib/python3.6/dist-packages/numpy/lib/stride_tricks.py in _broadcast_to(array, shape, subok, readonly) 127 it = np.nditer( 128 (array,), flags=['multi_index', 'refs_ok', 'zerosize_ok'] + extras, --> 129 op_flags=[op_flag], itershape=shape, order='C') 130 with it: 131 # never really has writebackifcopy semantics ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (101,) and requested shape (101,51) ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,469344355