Skip to content

Plotly not working with Streamlit #2582

@alphadatagamma

Description

@alphadatagamma

I am having trouble getting plotly to work with streamlit. All other plotting libraries seem to be working fine.
I have tried installing and reinstalling the package sevaral times.

This is my code;

import os
import glob
import time
import multiprocessing

import streamlit as st
import numpy as np
import pandas as pd
import plotly.graph_objs as go

fig = go.Figure(
data=[go.Bar(y=[2, 1, 3],x = [1,2,5], )],
layout_title_text="A basic potly graph" #Naming my graph
)
fig.show()

st.plotly_chart(fig)


img

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions