Open
Description
This code snippet will plot two lines:
import plotly.graph_objs as go
anchor_rate = [1000, 1660.89, 3220.62, 5927.36]
anchor_psnr = [31.799098, 34.155477, 36.053423, 36.5]
tested_rate = [752.33,1608.90,3114.10,5685.72]
tested_psnr = [31.336015,33.752160,35.730303,37.200365]
fig = go.Figure()
fig.add_trace(go.Scatter(
x=anchor_rate,
y=anchor_psnr,
))
fig.add_trace(go.Scatter(
x=tested_rate,
y=tested_psnr,
))
fig.show()
How to fill between two lines in y direction only within intersection part, like this? And how can fill them with different colors?
In summary, two questions:
- How to fill between two lines in y direction only within intersection part?
- And how can fill them with different colors?