I want to create something like in Plot 1 here https://stackoverflow.com/questions/61892036/plotly-how-to-colorcode-plotly-graph-objects-bar-chart-using-python in vestlandās reply but using graph objects instead of plotly express as I need to use FigureWidget.
Basically, I want x-axis to be a column of continuous data, y-axis to be a column of categorical data, and the color to be another column of continuous data.
The problem is if you donāt use plotly express, the legend is not generated. While you can set āshowlegend=Trueā and "marker_color=df[ācontinuous_dataā] , the legend is wrong as illustrated here:
-
How do I use graph objects to generate a bar chart and legend similar to āPlot 1ā in the stackoverflow reply by vestland?
-
Or alternatively, is there is a way to use plotly express with FigureWidget?