Black Lives Matter. Please consider donating to Black Girls Code today.

R Plotly scatterplot color issues with multiple symbols

I’m having some strange trouble with scatter plot colors when I introduce symbols. As an example, the following “R” code correctly plots 20 data points with 20 different colors:


However, if I now introduce two different symbol types, the scatter plot is reduced to 2 colors (however the hover text retains the 20 colors)


The result is here (sorry I can only post one image):

Is there an easy way to fix this?

I am having similar problems … and no idea what to do. Doesn’t seem to be much help via the forum.