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.

No barcharts in Jupyter Lab

See original GitHub issue

Plotting offline in Jupyter Lab produces a line chart instead of a bar chart.

Using this code in Jupyter Lab (0.27.0):

import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import init_notebook_mode, iplot
init_notebook_mode(connected=True)

data = [go.Bar(
            x=['giraffes', 'orangutans', 'monkeys'],
            y=[20, 14, 23]
    )]

iplot(data, filename='basic-bar')

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
fperezcommented, Mar 15, 2018

I can confirm that with current JupyterLab, and installing the extension via

jupyter labextension install @jupyterlab/plotly-extension

the following code:

import plotly.offline as py

from plotly.graph_objs import *
import plotly.graph_objs as go

py.init_notebook_mode()

trace = go.Heatmap(z=[[1, 20, 30],
                      [20, 1, 60],
                      [30, 60, 1]])
data = [trace]
py.iplot(data, filename='basic-heatmap')

renders fine:

image

I’ve been testing more complex plots, including interactive controls:

image

and 3-d plots:

image

and everything is working without a glitch.

I’m going to close this one for now as I think it’s resolved, feel free to ping if it shouldn’t.

cc @jegonzal who authored the code from the above screenshots. All working great on JLab!

1reaction
jwhendycommented, Nov 5, 2017

Closing the loop here. I was having issues with jupyter lab in general related to this yesterday.

I had been using the --dev-mode option as mentioned, but just went through and did jupyter lab build as described here and all is well for me now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Barchart plot and display issue in Jupyter notebook when ...
I am trying to plot a frequency distribution of data loaded into Jupyter notebook from a csv file in my AWS S3 bucket....
Read more >
Bar plot not showing up in Jupyter Notebook
I am trying to create a bar plot for a Pandas Series and the bar plot is not showing up in Jupyter notebook....
Read more >
Bar charts with error bars using Python, jupyter notebooks and ...
Bar charts without error bars give the illusion that a measured or calculated value is known to high precision or high confidence.
Read more >
Building bar charts using Matplotlib - Towards Data Science
A guide on how to present your data using bar charts ... Step-by-step guide to building Bar Graphs using Jupyter Notebook. Load the...
Read more >
Bar Charts and Pie Charts - Problem Solving with Python
import numpy as np import matplotlib.pyplot as plt # if using a Jupyter notebook, include: %matplotlib inline. We need some data to add...
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