![]() So downright place, let's execute this way. But number 6, it means that the last one. And this is the second subplot is 2 by 3 and this will be located on the upper middle slot and we are adding another, the third column. So in this case this subplot is placed on the first area. That is 1 of the upper middle, number 2 upper right, that is number 3. It means that vertically there are 2 rows, horizontally gently there are 3 columns and the numbers starting from left, upper left. So on a canvas if you use this subplot, it means that you are dividing the canvas into two rows. Second number determines the number of columns and the third number is the sequence of slots. First 2 integers determined dimensions, for example, 2 here number 2 means, number of rows. How can you divide the whole canvas? Use subplot function, subplot function take three integers. Then you need to subdivide the whole canvas into pieces. And then after creating this canvas you want to add multiple plots, multiple figures on that canvas. So figure sides, figure side function can be used. Why? Because or default Canvas will be attached default canvases created then what is the size of default Canvas? 6.4 by 4.8 partner. If you owe me this the first command line actually you don't need to worry about the outcome. So it is the first number is for the horizontal line the second number is vetical line. In order to create a Canvas, you need to use this one plt.figure and you can control the size of canvas by giving this command line figure size equal in a couple you are providing to information 10 years low length and five is the color length. Now it's time to create a Canvas which is the basis of visualization. Right? So they're building for column names are sliced standard stored in our list. And if you want to take only four column names, you can take it slicing column names. There are four column names, simple length simple width, or pedal length pedal with and label. So it takes a little bit of time still I'm waiting for changing this ass risk and number one because yeah, now it is ready because it is changing. We are importing four libraries and also importing data set. ![]() And I'm changing color names into this format because it is short and easy to type. So in your data directory you probably already have this IDCSV data. We are ready downloaded this ideas data set when we study pandas dataframe. Seaborn is imported as SNS and we are going to use irish data for visualization. And with that interface we can use the tools reading matplotlib. Lip bad pipeline pipeline is a interactive interface matplotlib. Then you may think why we are importing matplotlib. We are importing matplotlib that pie plot as PLT. Numpy pandas bed plot live because met plot live as I already explained this based on Numpy, Seaborn is based on pandas. In that case you need to subdivide canvas into pieces. You may want to attach multiple paintings on that canvas. There are three ways of making canvas and adding plus. It's like you are drawing or painting in order to paint you need or canvas. Now let me explain how to prepare rock canvas creating graph. Box plot and violin plot quite similar but violent plot provide a richer information than box plots. I will introduce several graphic tires line grab bar plot, history, Graham scatter plot, box plot and violent plot. ![]() So in case of seaborn, it is much easier to use or seabornt to create graphics then matplotlib. So that is good benefits and also seaborn is more tied to pandas data frame. You can add confidence intervals in drawing graph. Later I will show you how it is different from that plant live but seaborn is basically for statistical rapid. Seaborn is specialized for statistical graphics. Seaborn is another library for data visualization. So it is a rare case, but sometimes you may convert data framing to number if you are facing a problem. You can overcome some difficulties you face in drawing graph but it is not frequently happening. That's why sometimes if you face difficulty in drawing a graph with pandas data frame library, it is better to convert the data frame data into non priority. But basically matplotlib is based on don't priorities. Numpy array data to in case of matplotlib definitely you can use matplotlib for pandas data frame or you can provide least data to plot live in order to do graph. You can do any kind of graph with matplotlib. The first matplotlib is a library with which you can draw all kinds of grabs, you can draw a line, grab box, plot history, graham pie chart. Those are two major libraries for data visualization. You can yours to libraries matplotlib or seaborn. Now it's time to study data visualization. ![]() So far I covered many topics which is important in python coding. We are now heading toward the end of this Coursera course. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |