I’m trying to figure out how to create multiple iterations of a scatter plot while maintaining the coloring of each of the markers.
For example, I have created a scatter plot using the following code but now I want to create another version of the scatter plot that shows only the top values while maintaining the same coloring from the original scatterplot.
ip11 <- plot_ly(x = Lshape$X, y = Lshape$Y, type = ‘scatter’, mode = ‘markers’, text = Lshape$monitor_hitCount,
marker = list(color = Lshape$monitor_hitCount, colorscale = c(’#FFE1A1’, ‘#683531’), showscale = TRUE,
transforms = list(type = ‘filter’, target = Lshape$monitor_hitCount, operation = ‘>’, value = 20)
Secondarily, I would like to maintain the scaling of the plot so that the graphical distance between grids on the x and y axes can be fixed (I have other data sets and I would like the distance between the grid lines to be consistent).