I really love the simplicity of plotly express’s scatter(trendline=‘ols’) option. Thank you for the package! I’ve used it to quickly perform OLS calculations and plot trendlines across thousands of categories at once, storing all the ols results within a list of lists of dataframes, which allows me to show them as separate tables in web applications. The high level wrapper here is powerful for having such simple syntax!
However, as I push the boundaries of number of groups/trendlines like this, plotting becomes crowded with both points and trendlines. I’d like to remove all the scatter markers from the plots to make getting the ols info on hover a little bit easier. I’ve looked around for a while and read through the reference documentation, but have not found a way to do this using plotly express.
So here is my question:
Does plotly express provide a way to remove scatter traces but keep trendline traces, or alternatively, to simply disable the scatter trace hoverinfo but keep trendline hoverinfo?
I know I could achieve a similar plot functionality by going to the lower level and creating dictionaries for each trace, but this loses the convenience I love about using express. I’d end up importing scikit learn (or similar) separately, doing calculations across categories first, looping through traces across categories, etc.