#Machine Learning Bootcamp, code is properly running but the plot doesn’t show. I have seen many tutorials but I can’t the proper solution. How to fix it?
Can you share the notebook link here? I’ll try to figure out the issue.
Initialize all libraries in one cell…
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import plotly.offline as py
import plotly.graph_objs as go
import plotly.express as px
py.init_notebook_mode(connected=True)# to display plot on kernal
import plotly.io as pio
px.bar(dataframe.head(10), x=‘col_name’, y=‘Col_name’, color=‘Col_Name’, height=500)
Here is a troubleshooting guide on Plotly’s website that might help you out: https://plotly.com/python/troubleshooting/
Under the ‘Jupyter Classic Notebook Problems’ section, it tells you to use fig.show(“notebook”) instead of just fig.show(). It also provides a few more methods in case this one doesn’t fix the problem.
Let me know if this works for you.