官术网_书友最值得收藏!

Which Tool Should Be Used?

Seaborn tries to make the creation of some common analysis graphs easier than using Matplotlib directly. Matplotlib can be considered more low-level than Seaborn, and although this makes it a bit more cumbersome and verbose, it gives analysts much more flexibility. Some graphs, which with Seaborn are created with one function call, would take several lines of code to achieve using Matplotlib.

There is no rule to determine whether an analyst should use only the pandas plotting interface, Matplotlib directly, or Seaborn. Analysts should keep in mind the visualization requirements and the level of configuration required to create the desired graph.

Pandas' plotting interface is easier to use but is more constrained and limited. Seaborn has several graph patterns ready to use, including common statistical graphs such as pair plots and boxplots, but requires that the data is formatted into a tidy format and is more opinionated on how the graphs should look. Matplotlib is the base for both cases and is more flexible than both, but it demands a lot more code to create the same visualizations as the two other options.

The rule of thumb that we use in this book is: how can I create the graph that I need with the least amount of code and without changing the data? With that in mind, we will use the three options, sometimes at the same time, to attain our visualization goals. Analysts should not be restricted to just one of the options. We encourage the use of any tool that creates a meaningful visualization.

Let's go through the most common kinds of graphs used in statistical analysis.

主站蜘蛛池模板: 栖霞市| 攀枝花市| 方正县| 康马县| 马边| 西昌市| 皋兰县| 海盐县| 兰西县| 独山县| 雷州市| 平度市| 青河县| 安达市| 浪卡子县| 顺昌县| 报价| 垦利县| 湖北省| 阿图什市| 长治市| 张家川| 太谷县| 京山县| 阜宁县| 工布江达县| 朝阳区| 奉贤区| 肃南| 长治县| 定结县| 西昌市| 陈巴尔虎旗| 无锡市| 紫阳县| 河津市| 垫江县| 基隆市| 江西省| 山丹县| 云和县|