Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze ggplot2 facet Bubble Chart

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report