I had the same problem with my graph. Just add the following to layout code:
xaxis=dict(type = "category")
Note: I have used import plotly.graph_objs as go
and NOT import plotly.express as px
This worked for me. Hope it helps you too.
More Related Contents:
- Plotly: How to define colors in a figure using Plotly Graph Objects and Plotly Express?
- Plotly/Dash display real time data in smooth animation
- How to define colors in a figure using Plotly Graph Objects and Plotly Express
- Pandas: How to easily share a sample dataframe using df.to_dict()?
- Plotly: How to display charts in Spyder?
- How to easily share a sample dataframe using df.to_dict()
- Plotly: How to set node positions in a Sankey Diagram?
- How to save plotly express plot into a html or static image file?
- Plotly legend next to each subplot, Python
- How to make a line plot from a pandas dataframe with a long or wide format
- Plotly: How to specify colors for a group using go.Bar?
- How to display charts in Spyder
- Interactive matplotlib figures in Google Colab
- Plotly: How to filter a pandas dataframe using a dropdown menu?
- Running a Dash app within a Flask app
- How to avoid duplicate legend labels in plotly or pass custom legend labels
- Python package to plot two heatmaps in one (split each square into two triangles)
- Is it possible to create a subplot with Plotly Express?
- plotly sankey graph data formatting
- Embedding a Plotly chart in a Django template
- Customizing the order of legends in plotly
- Plotly chart not showing in Jupyter notebook
- Pandas percentage of total with groupby
- Element-wise addition of 2 lists?
- How to explode a list inside a Dataframe cell into separate rows
- Unable to locate element using selenium chrome webdriver in python selenium
- List comprehension vs generator expression’s weird timeit results?
- ‘Conda’ is not recognized as internal or external command
- Let JSON object accept bytes or let urlopen output strings
- How to invoke pandas.rolling.apply with parameters from multiple column?