In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to understand the interactive bar chart of the plotly package in R language. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
The plotly package is not only a package, but also a multivariate interactive drawing system that can be called in languages such as Python, MATLAB, and Perl.
Installation
Install.packages ("plotly")
Drawing format
The basic drawing function of the plotly package is plot_ly ()
Data: indicates that the data type is a data box
... Is the default parameter
Type: a string that specifies the trace type. "scatter scatter", "bar bar", "box box", and so on. If specified, it always creates a trace, and if it is not specified, the system will automatically find the appropriate graphic type for visual demonstration based on your data type.
Color: the value of the color mapping to the associated fill-color attribute, and the mapping from the data value to the color code can be controlled using color and alpha, or masked entirely by I () (for example, color = I ("red"))
Colors: custom color, or colorbrewer2.org palette name (for example. "YlOrRd" or "Blues"), or color vectors interpolated in hexadecimal "# RRGGBB" format, or color interpolation functions such as colorRamp ()
Alpha: color transparency, a number between 0,1, that specifies the alpha channel applied to the color. Defaults to 0.5 when mapping to fillcolor, otherwise 1
Symbol: point parameter, similar to color parameter
Symbols: reference colors
Siza: point size parameter. Refer to symbol parameter.
Linetype: linetype parameter, refer to color parameter
Linetypes: refer to colors parameter
Split: facet parameter, which is faceted according to the factor level of the variable
Width and height represent the width and height of the graph.
Practical case
# draw an interactive column chart using a subset of 600 rows of the diamond data set.
The downloaded picture cannot be displayed interactively, you can click the link to view the picture.
Http://localhost:13645/session/viewhtml107a74fc9b52/index.html
This is the end of the interactive bar chart on how to understand the plotly package in R language. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.