question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lineplot Rangetool broken?

See original GitHub issue

Hi, when I execute your sample code in Jupyter:

ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000))
df = pd.DataFrame(np.random.randn(1000, 4), index=ts.index, columns=list('ABCD'))
df = df.cumsum()
df.plot_bokeh(rangetool=True)

The following Error appears:


AttributeError Traceback (most recent call last) <ipython-input-17-ee1456589bb0> in <module> 3 df = df.cumsum() 4 ----> 5 df.plot_bokeh(rangetool=True)

~/anaconda3/envs/E1lib/python3.7/site-packages/pandas_bokeh/plot.py in call(self, *args, **kwargs) 1735 1736 def call(self, *args, **kwargs): -> 1737 return plot(self.df, *args, **kwargs) 1738 1739 @property

~/anaconda3/envs/E1/lib/python3.7/site-packages/pandas_bokeh/plot.py in plot(df_in, x, y, kind, figsize, use_index, title, legend, logx, logy, xlabel, ylabel, xticks, yticks, xlim, ylim, fontsize, color, colormap, category, histogram_type, stacked, weights, bins, normed, cumulative, show_average, plot_data_points, plot_data_points_size, number_format, disable_scientific_axes, show_figure, return_html, panning, zooming, toolbar_location, hovertool, hovertool_string, vertical_xlabel, webgl, **kwargs) 477 hovertool_string, 478 number_format, –> 479 **kwargs 480 ) 481

~/anaconda3/envs/E1/lib/python3.7/site-packages/pandas_bokeh/plot.py in lineplot(p, source, data_cols, colormap, hovertool, xlabelname, x_axis_type, plot_data_points, plot_data_points_size, hovertool_string, number_format, **kwargs) 1013 hovertool_string=hovertool_string, 1014 number_format=number_format, -> 1015 **kwargs 1016 ) 1017

~/anaconda3/envs/E1/lib/python3.7/site-packages/pandas_bokeh/plot.py in _base_lineplot(linetype, p, source, data_cols, colormap, hovertool, xlabelname, x_axis_type, plot_data_points, plot_data_points_size, hovertool_string, number_format, **kwargs) 951 source=source, 952 color=color, –> 953 **kwargs 954 ) 955

fakesource in line(self, x, y, **kwargs)

~/anaconda3/envs/E1lib/python3.7/site-packages/bokeh/plotting/helpers.py in func(self, **kwargs) 855 mglyph_ca = None 856 –> 857 glyph = _make_glyph(glyphclass, kwargs, glyph_ca) 858 nsglyph = _make_glyph(glyphclass, kwargs, nsglyph_ca) 859 sglyph = _make_glyph(glyphclass, kwargs, sglyph_ca)

~/anaconda3/envs/E1/lib/python3.7/site-packages/bokeh/plotting/helpers.py in _make_glyph(glyphclass, kws, extra) 396 kws = kws.copy() 397 kws.update(extra) –> 398 return glyphclass(**kws) 399 400

~/anaconda3/envs/E1/lib/python3.7/site-packages/bokeh/model.py in init(self, **kwargs) 305 kwargs.pop(“id”, None) 306 –> 307 super(Model, self).init(**kwargs) 308 default_theme.apply_to_model(self) 309

~/anaconda3/envs/E1/lib/python3.7/site-packages/bokeh/core/has_props.py in init(self, **properties) 251 252 for name, value in properties.items(): –> 253 setattr(self, name, value) 254 255 def setattr(self, name, value):

~/anaconda3/envs/E1/lib/python3.7/site-packages/bokeh/core/has_props.py in setattr(self, name, value) 286 287 raise AttributeError(“unexpected attribute ‘%s’ to %s, %s attributes are %s” % –> 288 (name, self.class.name, text, nice_join(matches))) 289 290 def str(self):

AttributeError: unexpected attribute ‘rangetool’ to Line, possible attributes are

js_event_callbacks, js_property_callbacks, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, name, subscribed_events, tags, x or y

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
PatrikHlobilcommented, Oct 17, 2019

Hi @Kladderadatasch ,

This is correct. With version 0.4 I have issues converting it to a conda package 😔. However since it is a pure python package, you can savely install it via pip.

Best Patrik

0reactions
Kladderadataschcommented, Oct 17, 2019

Hi again @PatrikHlobil,

I guess there’s a small issue with the PyPi packages. If you install it via pip, you’ll receive version 0.4, but through conda you’ll receive version 0.3. Maybe give that a check ?

Cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bokeh Plotting Backend for Pandas and GeoPandas - GitHub
This simple lineplot in Pandas-Bokeh already contains various interactive elements: ... rangetool Enables a range tool scroller. Default False.
Read more >
Bokeh: plotting a large data set - python - Stack Overflow
After playing around I found out the simple fix to better see the data was in line 1. setting the plot's first x_range...
Read more >
Styling visual attributes — Bokeh 2.4.3 Documentation
To add line breaks to the text in an axis label, include \n in your string. To control the visual appearance of the...
Read more >
How Your Infrastructure Choices Make (or Break) Your Team Culture
In this talk, learn how your architecture can improve — or damage — your team's health. Key takeaways: * How systems can become...
Read more >
Plotting Bitcoin Prices as an Interactive Plot with a Range Tool | Sta
Creating a Basic Line Plot Based on Python Lists (11:17) · UPDATE! BokehDeprecationWarning: 'legend' keyword is deprecated.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found