Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to analyze ggplot2 facet Bubble Chart

Shulou Source: shulou.com Published: 2022-06-01 05:35:18 10月03日 Update

How to analyze the ggplot2 facet bubble chart pie chart, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

The facet function in ggplot2 system has only a simple facet_grid (), but it is precisely such an unimpressive facet function, which even looks like a maverick, which has brought revolutionary changes to high-dimensional data visualization. With it, all ggplot2-based visualization graphics can expand the rendering dimension, from the third dimension, the fourth dimension, the fifth dimension (theoretically).

Or re-emphasize the position and control scope of facet_grid () in each geometric layer of ggplot2, facet function, as a special, aesthetic mapping attribute, is designed in an almost independent position with the geometric layer (shown in terms of writing, it is not designed in the geometric layer, but parallel to the position of other geometric layers), thus it can be seen that the package author respects and attaches importance to it.

Its control authority is very high, if you specify a facet parameter inside the facet_grid () function, then all remaining geometric layers can automatically apply this facet (of course, the premise is that the aesthetic mapping of each geometric layer contains the same variables as the facet parameter).

So if you want a facet parameter colleague to control multiple layers, you must ensure that each layer contains a variable with the same name as the facet parameter.

Today, take the bubble pie chart as an example:

Library (ggplot2)

Library (dplyr)

Library (rgdal)

Library (shiny)

Library (shinythemes)

Library (scatterpie) imports and organizes map data: china_map

Tags: Bubbles geometry data functions parameters analysis variables problems control status more aesthetics high-dimensional visualization help solutions design easy same eye-catching Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft OPPO Reno Apple Xiaomi