python - Plotly strip 图 : avoid spacing between colors in px. strip

标签 python plotly strip

https://plotly.com/python/strip-charts/ 中的第二个例子显示添加颜色(见下面的屏幕截图),但这也会自动在红色和蓝色点之间创建间距。

enter image description here

如何关闭它?如何确保我的点为分类变量着色,而不制作两个单独的“ strip ”?

最佳答案

试试 stripmode='overlay' 选项。它应该产生以下结果。

叠加的数据点:

enter image description here

关于python - Plotly strip 图 : avoid spacing between colors in px. strip ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67983733/

相关文章:

python - 让__import__获取动态添加的方法

python - 如何将 pylab.plot 线放在 pylab.figtext 上?

python - python plotly : PlotlyError

unix - 如何在unix "./"中去除前导 "find"?

c - 丢弃符号有什么缺点?

python - 您如何遍历 pandas Dataframe 中的组,对每个组进行操作,然后将值分配给原始 Dataframe?

python - 如何从 jsonline 文件中的每一行提取元素?

python - 如何与 plotly 图表共享 jupyter notebook?

python - 如何在 plotly 中将纪元转换为日期

linux - 如何彻底剥离可执行文件