This is probably a very simple issue but I canβt for the life of me figure it out.
For a bubble chart I have years on the X-axis and a score between -1 and +1 on the y-axis.
I got the bubble chart to show data points only when I have 1 year with 2 points on the x-axis as shown here: https://plot.ly/~leonbakker/8/the-polarity-of-songs-of-good-and-bad-disney-characters-over-the-years/
However, when I have a list with multiple years it doesnβt show any of the data points as shown here: https://plot.ly/~leonbakker/6/the-polarity-of-songs-of-good-and-bad-disney-characters-over-the-years/
See below is the code for the 2 traces:
trace_hero = go.Scatter(
x=[list_years],
y=[list_compound_heroes],
mode='markers',
text = "",
marker=dict(
symbol='circle',
sizemode='area',
sizeref=1,
line=dict(
width=2
),
)
)
trace_villain = go.Scatter(
x=[list_years],
y=[list_compound_villains],
mode='markers',
text = "",
marker=dict(
symbol='circle',
sizemode='area',
sizeref=1,
line=dict(
width=2
),
)
)
For the first graph with only 1 year, list_years = [1937], list_compound_heroes = [0.992] and list_compound_villains = [-0.945].
For the second graph (where it doesnβt show any data points): list_years = [β1937β, β1959β, β1961β, β1967β, β1970β, β1973β, β1998β, β1999β, β2000β, β2003β, β2009β, β1940β, β2010β, β2013β, β1941β, β1991β, β1992β, β1981β, β1951β, β1953β]
list_compound_heroes = [0.9246, 0.9818, 0.6369, 0.2695, 0.9403, 0.2023, -0.5682, 0.9461, 0.9665, 0.99, 0.0898, 0.9726, 0.9597, -0.0387, 0.9776, 0.992, 0.9577, 0.9952, 0.9943, 0.9973]
list_compound_villains= [-0.9429, 0.9786, -0.927, 0.9961, 0.9848, 0.0, -0.8234, 0.9885, -0.8832, 0.8199, 0.9963, 0.9311, 0.988, 0.9859, -0.9729, 0.9943, 0.0, 0.3553, 0.8393, -0.9561]
Is there any reason why it wonβt show these data points?
Thanks in Advance
EDIT: fixed