English 中文(简体)
没有垂直分离线和习惯轮th的血缘
原标题:Histogram without vertical separation lines and with custom contour width
  • 时间:2024-02-03 16:28:32
  •  标签:
  • plotly
问题回答

图表与校正逻辑不同。 See this for more information。 在您的打算步骤图表中,有一条定制线宽度的方法。 利用散射地段的线性方式来说明该线的形状。 详见explanation。 此外,彩色在RBGA格式中有透明度规定。 然后,我们把图表的主题改为简明主题,以适应问题的形象。 最后,在自动提取的图表中切断了轴心,因此,我们明确了轴心的下限和上限,并提供了幅度。

import plotly.express as px
import plotly.graph_objects as go
import numpy as np

np.random.seed(20240204)
x = np.random.randn(400)
hist, bins = np.histogram(x)

fig = go.Figure()
fig.add_trace(go.Scatter(x=[x for x in range(len(hist))],
                         y=hist, mode= lines ,
                         line=dict(color= lightgreen , width=3, shape= hv ),
                         fill= tozerox ,
                         fillcolor= rgba(144,238,144,0.5)  # lightgreen+alpha:0.5
                        )
             )

fig.update_layout(template= simple_white , yaxis_range=[min(hist), max(hist)+5])
fig.show()

“enterography





相关问题
How to reduce decimal places in bar in Plotly express?

i need your help to reduce decimal places to 2 in my bar chart created by Ployly Express. enter image description here my code is: fig8 = px.bar( new_data, x=["Loyal", "Exited"]...

Embedding tweets in D3 tooltip

I m trying to build a custom D3 tooltip that displays a tweet widget using the copy/paste code from publish.twitter.com. I m setting up plots using plotly in R and would like a tweet widget to be ...

Treemaps With Plotly: Blank Screen

I am working with the R programming language. I am trying to plot a Treemap with plotly, but it s returning a blank screen I made my own dataset for this problem: dados <- data.frame( Marca = c(...

size legend for plotly bubble map/chart

Here is a plotly "bubble" map (i.e. a map with markers on it, whose size is mapped to a variable). However, the legend only shows the color categories, but does not show how size relates to value. ...

Select/copy hover text in R plotly graph

I would like to be able to select and copy the hover text in plotly graphs. Is that possible with the R API? For example, in this heatmap, upon mousing over coordinates (X=a, Y=d), one can see the ...

热门标签