R Data Visualization Recipes
上QQ阅读APP看书,第一时间看更新

How it works...

Step 1 demonstrates how to reduce points using ggplot2. Oddly, the argument used was shape and not size. Actually, the shape '.' replaces circles with really small dots. This reference is even smaller than point number 20. Adjusting the size argument is also an option but requires the addition of scale_size() along with the range argument, as the last recipe did.

Look at step 2 to understand how to change points size using plotly. Argument marker is able to change a bunch of marker properties, input it with a list and name the properties do you want to change as list's elements. In order to reduce points this step had named size as a list element which value was set to 0.8. 

Step 3 shows a tricky detail about reducing points with ggvis. Simply declaring the size argument into layer_points() by using an equal signal won't do it. Declare it using := (not scaled) signal instead of = (scaled). The colon along equal signal tells ggvis (only ggvis work this way) that the number inputted must no be re-scaled.