Closed robroc closed 4 years ago
So to set the maximum size you can use size_max
, and the minimum size today is always zero. This means that if your dataset contains numbers between, say, 30000 and 30500, then all the markers will appear roughly the same size, because they're pretty equally-far from zero.
Oh I see. So if I want all markers to be the same size, I can set any single number on the size column, and make size_max
the actual size I want?
Ah, sorry, I misunderstood your goal! If you want all the markers to be the same, non-default size, then you should use something like px.scatter(<no need to set size here>).update_traces(marker_size=<whatever>)
Basically the size
kwarg in PX is to map to data. If you don't want to map to data then just let PX give you the figure and tweak it afterwards with e.g. .update()
or .update_traces()
(we're working on better documentation for this!!)
Now I'm getting this error:
AttributeError: 'ExpressFigure' object has no attribute 'update_traces'
When I try with .update()
, it throws a KeyError with marker_size
.
you'll have to upgrade plotly
to 3.9 or 3.10 :)
That did it. Thank you!
Any idea how to get rid of the Numpy FutureWarning?
which versions of scipy and statsmodels have you got?
scipy==1.2.1 statsmodels==0.9.0
No matter which value I set in the size column of the dataframe, the markers on a scatter plot come out huge. Only the markers on the legend seem to respond.
Likewise, plotting returns this error for each feature drawn:
Data frame looks like this:
Code used:
Result:
Environment:
Python 3.6 Jupyter Lab 0.35.4 Plotly Express 0.1.1 Numpy 1.15.4 pandas 0.24.2
Additional comment: it would be nice to set the marker size manually in the function call.