I have a dataframe df
:
x y z ... colours marker_size marker_opacity
test1 0.118709 0.219099 -0.024387 ... red 100 0.5
test2 -0.344873 -0.401508 0.169995 ... blue 100 0.5
test3 -0.226923 0.021078 0.400358 ... red 100 0.5
test4 0.085421 0.098442 -0.588749 ... purple 100 0.5
test5 0.367666 0.062889 0.042783 ... green 100 0.5
I am trying to plot this with plotly like so:
fig = px.scatter_3d(df,
x='x', y='y', z = 'z',
color='labels',
hover_name = df.index,
opacity = 0.5,
size = 'marker_size')
fig.write_html(file_name)
When I open file_name
, everything is fine, but my points are too big. When I alter the 'marker_size'
column of my df
, nothing changes (I have tried 0.1, 1, 10, 100...).
Why is this?
I have also tried:
Param:
size = 1
:
Result:
ValueError: Value of 'size' is not the name of a column in 'data_frame'. Expected one of ['x', 'y', 'z', 'labels', 'colours', 'marker_size', 'marker_opacity'] but received: 1
Param:
size = [1]*len(df)
:
Result:
No difference to using the 'marker_size'
df
column