Open AlexeyPechnikov opened 2 years ago
It works if your remove c='mission'
so this has to do with the colorization by another dimension, it's definitely a bug.
That looks totally useless to limit line size to just 2 points.
So there's obviously no limit to 2 points per path.
A potential workaround for you is to directly use GeoViews, which works as expected. It's a good hint that the bug lies in hvPlot's code base.
import geoviews as gv
gv.extension('bokeh')
gv.Path(df).opts(color='mission', show_legend=True)
PRs are always welcome :)
@maximlt Thanks. Actually, I use polygons but it was so weird when their border geometries (lines) cannot be plotted by some reason :)
After further investigation I believe this may be related to holoviz/holoviews#4862.
To trigger it, simply do: gv.Path(df).opts(color='mission', show_legend=True, tools=['hover'])
This error:
BokehUserWarning: ColumnDataSource's columns must be of the same length.
goes away once the Hover tool is disabled.
I can also add that it happens with both Python 3.7/3.8 and LineString/MultiLineString.
I'm hitting the issue with 0.8.3 and can verify the adding tools=['hover']
in geoviews triggers it. If there any way to disable to hover tool from hvplot as a workaround.
I'm hitting this in geoviews 1.12.0 once I add in tools=['hover']
like everyone above said.
It works for 2 point lines only:
But it doesn't work for 3+ point lines:
Sure, in the real life we have longer than 2 point lines and hvplot is broken for them. That looks totally useless to limit line size to just 2 points. Obviously, there is no limitation in Matplotlib: