In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to make the chart smart by ggplot and plotly in R language visualization. The content is very detailed. Interested friends can use it for reference. I hope it can be helpful to you.
During this period of time, I have been studying ggplot2, a magical visual weapon, but even though ggplot2 is invincible, it can not show dynamic effects!
Recently found that R language official CRAN has a package called plotly, a detailed understanding of this plotly is based on js scripting language development dedicated to dynamic interactive visualization of the sharp weapon, the development of an online version and desktop version, and the effect is quite good!
And the plotly package mentioned here is the visualization package released by the agency specifically for the R language environment (with not only R language, but also an interface for MATLAB and Python), which can not only help ggplot2 package to make static charts dynamic, but also have its own unique mapping function syntax (syntax is very refined, it is said to be written with reference to ggplot syntax, basically easy to read).
Today, it only involves the dynamic chart function of ggplot combined with plotly, and does not involve the unique mapping function of plotly. (mainly because I am also groping, find a suitable time to share with you.)
Because this package is developed in aid of ggplot2, you need to load the ggplot2 package to work together at the same time.
Package download and load:
Devtools::install_github ("ropensci/plotly")
Library ("plotly")
Library (ggplot2)
Here I'll use ggplot2's built-in dataset, diamonds, to chart first, and then use the plotly function to make it dynamic.
To see the final dynamic effect more clearly, random sampling is used here, and only 500 records are selected.
Set.seed (2333)
Mydata
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.