Data Visualization with MATLAB - Part 1 | Tod Vachev | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Data Visualization with MATLAB - Part 1

teacher avatar Tod Vachev

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

15 Lessons (1h 37m)
    • 1. Introduction to the Class

      1:41
    • 2. MATLAB Basic Settings and Plot - Part 1

      16:15
    • 3. MATLAB Basic Settings and Plot - Part 2

      2:10
    • 4. Customizing Plots Part 1 - Labels, Grid, Font Styling

      9:29
    • 5. Customizing Plots Part 2 - Titles

      0:54
    • 6. Customizing Plots Part 3 - Axis Limits

      4:45
    • 7. Customizing Plots Part 4 - Line width and color

      6:04
    • 8. Hold on! Multiple Plots on a Single Figure?

      5:41
    • 9. Legend - What does this line do?

      3:29
    • 10. Multiple Plots Part 1 - Figures

      2:21
    • 11. Multiple Plots Part 2 - Subplot

      3:35
    • 12. Customizing Plots (Advanced) Part 1 - Markers

      5:06
    • 13. Customizing Plots (Advanced) Part 2 - Ticks and Grid Manipulation

      7:43
    • 14. Customizing Plots (Advanced) Part 3 - Ticklabel and Lineplots

      11:35
    • 15. Two Y Axes on a single figure? Call PlotYY! (2D Project)

      16:33
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

262

Students

--

Projects

About This Class

In this class, you will learn the basics of creating and manipulating beautiful graphic representations of data in MATLAB. Focus is on 2D plots, 3D and higher dimensions are discussed in Part 2.

Meet Your Teacher

Teacher Profile Image

Tod Vachev

Teacher

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction to the Class: welcome to data visualization with Ma Top. The basics and beyond. This course will be presented by me daughter Watches and Crystal Numeroff. Christo is a PhD interior of communication and his currently rocking at Stop 50 months off contributors worldwide. This is his website, where you can find many different motive examples. I am a student of his, and I've been working with model for the past two years. 80% of the sensory information the brain receives comes from our eyes, so the visual presentation of data is the natural choice. This is why, in this course will focus on data visualization. By the end of the course, you feel very comfortable working with data visualization techniques. The great thing about the techniques that were going to teach you is that they can be used toe represent any kind of datum. It's independent off your field of interest. Will export styling techniques, acts, manipulation, multiple graphs in a figure, multiple figures, styling off the boats. Multiple. Why access three to line blocks, counter and surface sports slices, skater and others. Some of the data visualization techniques that we're going to teach you were related. Visualize data in more than three dimensions, and we'll have a few projects to practice these techniques. The ideal students for our cars are actual strings scientists, academics and basically anyone who wants to learn how to be realized. Some kind of data. Thank you for your time. If you're free to look at the course description and refuse, join us. 2. MATLAB Basic Settings and Plot - Part 1: all right. We will start with the basic math up stagings. When you first install mop up, It looks just like this. All characters, that writer just small. And it sounds very convenient to use model up. Just in this way, I will show you how toe increase this, the font size off the decks that you write the commands, how to change your layout and how you can view a few other things in the world. Space. Instant instead, the name and the value off the things in the workspace. No increases. Increases size of the font size. In your model up, you have to go to the preferences phone Montag phones. And here it changed the phone size. You just have to work, which is untrue. If I find the right one for you, I like mine that then it's big enough for me. That's all for the pump that is you. The next thing that I like to change when I first installment talk is the layout. As you can see, the only things that you care from the default layout are the current folder, the command window and the workspace you also given Editor, in which you write your coat before and you can earn it after you write it in the command. Quinto, you can do this, but it's It's more is all different and that and you can can't go back and change it. That's why you haven't aided our way where you write all their commands at once and during it afterwards. No. In order to bring the editor back in your mouth while you can click new script and the editor shows up here Now, in your case, your editor may be out of the model general window. Like like this. You may have to separate windows for model up, one for its for the commander, your grandfather and workspace. And one for the ages. Of course, it was just so you can bring the editor window back in mother to do this, actually convince little arrow here and select doc editor? No, Um, there are a few other improvements that you can make in the layout. At least, in my opinion, if it's ok for for your life, yes, you can use it like just, uh, I like to plays the command window here. Both the workspace, The current folder below the commander there, next to the workspace and lark. Just No, Uh, What may be the reason for using the for giving the command widow window and the editor of one place. When you're in your coat, you forgive if you have some errors in your coat that is written in the editor, you will see the heirs in the amount window. This is why it's convenience toe. Have them in the same place. Let's walk thes justice. All right? No, I will show you what? What? I mean by by these. Now, when you're right or coat in your agentur before you can run it, you must save it. One thing to note about this green arrow here that runs your coat is that it won't ask you . If you want to save your file, it will automatically save it for you. As you can see, it stays safe and thrown the keys. Five. No, you fire, uh, make a variable a city tickle toe five. And I run this pile. It will first. Since this is a new file, it will first ask me where it wants to save it and what it should be called. Now, let's call it tutorial one. Save it and we weren't. Now you get a more more complicated file with a lot of variables. You were here. You have them all here in the workspace. Some of them may be a race. You may not be able to see their values. The commandment is useful in this case because you can quickly move between the editor and the command window. You can compare things. You can check the values off the variables, every hair on array. Let's say great B is equal to 123456789 We're in this. It's not big enough. Oops, Just there you've here for bigger array, you can see its values. You can immediately use the command window and say variable be element five. Or should I say Arabian things will talk more about them later. I just want to show you why I like to give my command window next to the editor. The errors. If you have an error, maybe there. You immediately see that you Kevin Error. Where is it and what you should do to fix it? If the editor is in a separate window, you have tow, all stop all the time. And it's not very convenient, at least for me. No. A few things about the workspace. A. So you can see, the only things that you can see here at the moment are the name of the variable or the array or what they were. It is in its value. If you right click here, you can, um, see a lot more. You can bring out a lot more about them. Then you're going underneath. You can get the minimum minimum values. You can get the size off the variable or the rate and more you just bear on, then them and use the ones that you think you are going to need. All right, let's limit the size mean No, that's fix this now. A. So you can see. Every time I run this file, I get an output in my way in my command window. That output is the variables. The very was itself. And, as you can see, model up is trying to tell me that there is something that I can improve in my coat here. Asi it says Terminate. Terminate the statement with seven column to suppress the out if you put it will put same McCone at the end off the the lines that contain variables, it will suppress the output. And when we're own earned this file, there were no are you can see here we have both the very end array being output in the command window. Now we don't. This is again useful. If you have a complicated file, you may hear, uh, you may have many, many, many variables and maybe there you have many variables and you can quickly get lost. No, Uh, a few years for commands that you care for your disposal. The command COC means clear command window. When you were on, just called everything to the command window gets cleared like this. There is nothing anymore in the commandment. All usually all must log files that are written. Start with this command. There are two more commands that are included here, but we will see them later. Another very, very, very useful command that you can use is the help command the yolk a month. Those what other commands to do? If you were a help COC we will see the COC clear command window clears the command window and homes. The cursor that like that. Another thing. Another way that you can use to bring the help. Come on. The help command to uses by moving your cursor to the command that you want to get help about and you click and to press F one. This breaks brings out the dialog window with a lot better explanation. It's a little better for market, so if we get more complex commands with more examples, it may be better to use the F one button instead of the help. Because if you get the help for block, for example, it's not very. It's not very useful life. It's all better, too. Here's the form in F one. This is going to look like it's working here. There it is. Look, it looks much, much, much, much, much better. You can get examples. It's more interactive, better looking. You kept graphic examples. You get the point. No, let's clear. Clear our command window and we will continue with Victor Generation. What is actually a vector victories one dimensional array are simply said, is just a set of data. This is a vector. 12345 This is just something that holds five numbers. Five failures. Victors can be used to story or data. That's actually what they're used for. You can access their elements, can work with them. Can both the data and a lot more. We'll see everything about them later. Now the way that you can generate vectors is by typing it in manually, just like I did right now. If the numbers are even evenly spread with even step, you get a commands to generate them. We was just come on. This will generate a vector with then elements starting from one incriminating by one until it reaches 10. If we're we're in this now we will get dis Victor on 2345678 time. Then, if you want the veterans to be oh, incriminated by tree, we just changed middle number. No, we hear 147 Then if you want, we can start from minus 30 and we'll hear a lot more numbers. Folks decision here. This is the easiest way to generate a vector. It's just skip the middle number. The incrimination will be out much cassette toe warm like this. No, let's create our first graph to create our Chris craft. We're going to use these two vectors with with pre generated that I have manually input the data off these vectors. Uh, I will explain what this e here means. The key here is the exponential on. Basically, for example, 12 e minus tree means this. It's the same thing us 12 times, then to the power of minus three. If we right in black hopes my six, it's the same thing, cause now something times 10 to the minus sixth. No way. Have two vectors. This is Victor off voltage. Using the percentage sign means that you start writing comments. Comments are not interpreted by math. Lop. They're not command there. Simply there for you. Toe better in this. Understand your cold. It's up to you to write comments. You don't have to write them now. This is voltage and this is current. No welcome on the blood command is the most commonly used used commands, toe generate graphs, blocks and it can take a lot of parameters. The most simple use of the blood commodities simply by using the vector that contains your your dependent values. In this case, it the dependent fellows will be the the current trailers like this. Now, if we were on this coat, the graph of the current it won't won't be against the voltage. The graph will be against automatically generated values from model up for our X axis, the vector that we used here, the data said the vector well out magically be used as the the dependent variable and the independent variable or the eggs eggs axis. Its values are automatically generated. Let's see what this will brink what this rule shows. All right, here's our first graph. As you can see on the X axis, we have 1234567 This These barrels are as much as the points we have. Thgraf may be accurate, but it's not the best way to do it. No, we continue by adding the second array off values. The voltage and the voltages are independent values, so they're going to be our X values, and the current will be our Y values. If we're in this court, we'll get the same graph the same grab. It looks like it's the same graph, but it has different fellows for the X axis. I want 1.2 country and soul 3. MATLAB Basic Settings and Plot - Part 2: now, the last thing that I want to discuss in this section is about is you remember in the beginning, I said, I said that usually all my files start with your commands. Always the same is just a simple, good practice. It's not necessary, but it's very cool practice. One of them is COC. The next one is clear and close off. Now what do they do? Clear clears all variables in the workspace. Now it is if we make a few new variables, like a five vehicles seven and they're here, four variables. If we write clear off them, get closed. Disappear, that's all. This is simply good practice because it's our cases. Mother may get confused with the other variables that you have. And if you can't from mistaking your power, it simple of a good practice. Now what clothes old do on does I'll just show you what does? If we're in this court, we get our both of sugar. And if you want to change something, for example, just simple point here and if you were in it again, the change happens on this both. It doesn't create a new plot. It keeps working on the same boat. Now let's return this to what? Waas. If we put bulls Oh, here and we run this. We will always get a new a girl. They're close it. It opens a new I closed. It opens a new one, even if I don't close it if you it happens too fast. But it's simply closing it and creating it again. 4. Customizing Plots Part 1 - Labels, Grid, Font Styling: what are labels? It's very simple. Our graph has to access in this case, but we don't know actually what the doctors are about. The labels will give them names. This is what they do. Very simple. The amount for the X axis for its label is simply X label reopens close brackets, Occupation marks and we were at our X axis name. In our case, it's emitter base voltage for the Y axis. It's similar it's while able, and in our case, are y Axis is based current. If we're on this court again, way get the, uh, oxes names. There they are now Dio they're not. They're pretty just like this. So Well, we walked out the few more things inside the names. Our emitter based voltage is you and it's in volts. Our base current is I be and it's in Yonkers. It occurring again. Their care. Power updated labels again. We can go off your markings improved. This won't be an eight to be indexes off you. No, To do this, we can use the lot X in taxes and we simply for soup indexes would simply use underscore. And if we have more than one index, you will see what will happen, and I will show you how to fix it. Now this because let's make them get though it were unjust. There, you see that here is making here be is perfect. It's a sub index off I but here in the middle, baseball teaching the X axis on Lee, the first letter is a sub index, and the 2nd 1 is not fix this. We simply have toe book our whole whole soap index in curly brackets like this. And if we were on the court now, it will work perfectly. There it is. It looks beautiful. Now we got even more just a simple example. We're on there. It is our separateness. This means that you can use words for sub indexes. That's what Big. All right. No, no. Let's, um let's create great for our blot. It will make the block mom more readable. Easier toe. Be understood. It's very simple. You just write Great. That's all. And different dare it is. We have a great no, Um I think to remember about great good should never be used simply as great. Because if you can turn it on and off we write great again, there will be no great, because when the culture runs, it goes from the first door to the bottom and it gets to hear it turns on the grids and then turns it off. You were right. Great again. It will turn it on in that phone off in the more complex file. In a bigger file, you may get confused and you may you may not be able to keep track of the great command. It was that last turn on or off. And that's why you can simply use something like a parameter or setting for the great command. And you can simply say on here and whenever you want toe during off the grid, you're simply write great off. Now, if I run, just there will be no great there. And if I remove this, of course I will have Great. Another thing that you can do with the grit is that you can make a dancer. Great. If that's what you need in our in this case, you're simply write great miler and it will run this. There it is. You have a minor, great more dancer grit. If you needs more precise critic. Did you simply hope you a lot more toe easily. Understand your graph or others to understand their graph your figure, Uh, maybe you want to print it, maybe wants to draw something on it. This will help you to do this. The last thing that we're going to do on our blood for now is that we were going to change the forms type and the front size off the text on the graph. I'm talking about districts now. If you're on Windows, you're most likely going to tow us to use the new Roman font or some other widely used from for windows. But if you're like me and your own looks, you may not help this forms. I'm not even sure if they they exist for looks. And maybe you are a totally different operating system. It doesn't matter on what system you are. If you're on math, LA you get a simple commands that will give you all the available phones, and you're going to know very easily what What fund your able to use in model of the command is simply list phones. And here I have all phones, phones that I can use for my graph now to change the front on the ground, we simply can't use the command set. The command sit takes a few parameters. The first parameter is a scandal. A candle. We're going toe. See what is what? Actually, it's a candle a bit later, but for before now we're going to use the parameter juicy A which stands for get current access. This will seem to get all accesses on on our blood and it will apply the changes on them now, The second parameter that set command takes is the name of the parameter that you want change. We want to change the form name. So we write formed name and the third parameter is the the the new value off this parameter that we are going to change. In our case, the name of the parameter is simply the name of the front that we want to use. We must just one of all these phones Now. I'm not sure which one of them is going toe Nice, but let's used, for example, digital sons. They view phones and we close our brackets. Let's run discord and see what will happen on. I'm not seeing any difference. Let's try something else. Pour Issa. What is this? Let's see. Boris. There it is. We have a totally different front now. Maybe it's not the most suitable formed for graph that you may have toe present somewhere. But just how you do it generally now a sounding to note, The twenties also applied on the values. As you can see, it's not only for the text, it's also on the values, and it's a plight on all accesses. You can also put more change more things in one set. Come on. You can also change the phone size, for example, by this phone size value. Let's it is 14 now. Every time when you wants to change some parameter, you must also supply a parameter and the value for the set command equal. And is we there? They are bigger numbers, bigger characters for the labels. It starts to look a bit bait. Better. I think that we're done for now. In this section on, Let's move on 5. Customizing Plots Part 2 - Titles: we can also our titles toe our blocks, and it's a simple us out of here. It's a simple writing Tyto and the title itself begin. Go art now graph its title to build base current through versus a knitter base base voltage off B G, which stands for bipolar junction transistor, which is a kind of off transistor that were not really interested in what it actually means . Now this will be our though antique were on it. There it is, our title up here. Oh, here. All right, let's move on. 6. Customizing Plots Part 3 - Axis Limits: now, as you can see, our graph down here starts from 0.1 and no from zero. In some cases, you may want to set the custom access limits. In our case, maybe we want to hear for our graph starts from zero from 0.1, and we may want the trend that 0.8 and not 0.6 point seven. This is very, very easy accomplished by using the hallway commands. It's a symbol as the label, it's simply X limb and you're not putting simply numbers here. They must be array off two numbers. People like these and we're going to set the limiting the X axes to be from 0.0 until zero born. Eight people were underscored. Now, there you can see it. Our graph on the X axis started from zero and answered your 00.8 and we're going to do the same for the y axis. Now think, why leave again for numbers from zero until 100 and 60 e minus tree. You remember? I guess what what the e does. And as you can see in this case, this is a bit too much. So we're going to change it. We're going to make it a little bit. Maybe 100 and 20. That's still too much. Understand, then. All right, I guess that this is okay. Now you can grow and you are seeing the full, the full line off your values. You know exactly where it starts and you know exactly where it where it ends. And you didn't know that in our previous case without their lives, because you see it, that it starts from here. But you, you actually, if you show it to someone who doesn't know what what he's seeing, he can be sure that this is actually your initial value. So it's a good practice. This is a good practice. Was simply put a little Let's go with a border of border with no graphs in yet off course. It all depends on the case. He told the person what you wanted to do. But it's just simply looking better like this Now are things that we can do is under way the other way that we can set the limits of a graph are is by using the his command, and it takes at least ah game. It takes the same kind of parameters I'm going to come in tossed these roles, and it is a combination of both the extreme and the while. You can amount in one command, so the 1st 2 brothers are the meal and maximum ex living and 2nd 2 brothers are for the white. So if we do it like this, we're going to get the same result exactly the same results. This is for low limits. It's a very complicated. It's very simple to use. You can also I go. I will show you one more thing that you can do with the limit commands. You can also cook your good parts of your graph now, for example, if you want from 0.45 to 0.6 and we're in it there, we get only this part of the graph that you want to use our why Ox isn't changed. It still has its normal vile values, but are X starts from 0.5 and ends at 0.6 7. Customizing Plots Part 4 - Line width and color: continuing with our next topic, which is about which is about changing the properties off. Our graph don't like color with the changing the symbol of the point of the graph and more . We're gonna say that Now, let's start with the block off the line. Color it. We're on this. We will see that our graph cast. Our graph is in blue color. Now, if you want to change the color, all we have to do is go up here in the lower bowl command and put the third parameter. We simply have to use the A letter for the corresponding color. We will provide you with a full list off all course that you can't available in my shop. But for our example, if we want to change the color to red, we simply have toe put the symbol air here. And if we're in, it's now our graph is now ready for it. We can also make it in green. We can also make it in, uh, Magenta, which waas and I think yes and more No. We can also change the We can also change the style off the line. We can We can make it the adult in line a line with dashes and dots and for long show Carson it is now, for example, if you want a dashed line, we simply put two dashes here in front of the color. If we're in this, not now, we'll see. Run! All right. The Ark graph is now dust. We may wanted to be with dashes and adults with Simply change the seconds dash dot When we do this. This is the result you here for with have dashes and dots dashes end the thoughts. No, we may also wants to hit dogs on the corresponding points of paragraph. The intersecting points off the accent y values. If you want them to be, for example, circles. We simply have to put on oh, here a circle and we're on this. And to get our dot our intersecting points in the graph, they're in circles. We can also use the D character which stands for diamonds, and now it looks it looks like diamonds. If you can see it, we can also change toe Xs. We can also changes to triangles. So let's go over this again. If we have only two symbols here like this for example, this is this defiance the the style off the wine In this case, it Toby attached line equal here on the single wine. It would be a normal one if we get nothing to also be a normal line. If you want the dashed line with thoughts, we put a dash and the dog If we want the dashed lines triangles, I think it will work there. It is a line with triangles. If you want to dash line triangles not like just there it is If you want here it doesn't really matter on which size toe triangle is you. Just Nieto. Here's all the need of parameters If you have to get a symbol for your intersecting points symbols for the style of the line or not if you don't want it If you want simply triangles you do it like this you simply put triangle there make it on Lee Onley circles. It all depends on what is it all depends on what you really need. No changes back to on the last line. You can also change the width of the line. You do this by saying line with and you then supply the value for line with Let's try to one is the normal with there it is. It looks better. In my opinion, if we use the Circo, it also gets not. Is this the land with off changes? The with off the symbols the warden The last I defined the symbols that we use for the intersecting points. If yours diamonds, they also get a ticker and you can't change it just as much as you want. Of course again, it all depends on what you really need. 8. Hold on! Multiple Plots on a Single Figure?: having more than one graphs in a single pool. It's very, very, very single. First week are second player values were going to use the same values for the voltage and we're going to get new values for the current. I will simply Cookie. This was here on. Let's simply change them just a little bit. And here on here No, it's also changed a variable name because we won't have two different balls. Let's go this I to and this will real court one. By the way, this is a very nice trick If you if you're naming value and you confused somewhere in your cold below all have to do is you can see breast shift and enter and it gets automatically her named everywhere Where in your coat off course you have to pay a bit. Careful with it is because not everything Everything works like you expected to work now for our second. We're going to use the first offshore. What will happen? You seem to say books you eye to what will happen. We get the simple the second figure. We don't get the first fear. It's Go on now We're going to fix this simple by saying, Hold on by the way, hope or the same way Great works. You don't get use on or off, but it's a very good practice to do so when we say Hold on in the first. After we kept usedto both command, it simply there wasn't there wasn't hold it hoped and put all next plots all next graphs in the same boat. People run this way. We'll have two grafs now Now it's probably not very hard to see that the barometer, the properties of kept changed here do not apply for the second plot, and it will want toe change it for the second blockers. Well was simply here to go after them now I would changed is true blue. There they are, our through bloats that's busy our highest value. Here's 150 are really with Gore's goes upto hundreds. And then no, This of course, doesn't give us the whole picture. It doesn't get shows the whole Graf Now I will move the wild limb command down here, and I would change this to the maximum value off I to now it goes upto 100 and 15 but now our now we keep values that are missing, and we will show we'll see if out basis a bit later. In the course you can use, you can use custom values if you want. You can specifically say how many values you want, how they should be, what should be the step between them and so lose. He disappeared later, as you can see our why why access is not enough for our 150 value in item. So I will simply change while in tow. 160 160 so we can see our graphs and that's it. It's as simple as this. If you want, you can even use you can. Even But the third graf utter to grab in the indisposed Let's make 1/3 1 I will move. Do it a bit faster. Just time I was simply more multiplied, and you? I tree two graphs. That's make it. I don't know yellow. You can also arrive. The names of the colors make it three points with a white. There it is again. You can see the whole Graf. Well, let's try. We will see a bit later in the course. How you can modified the values on the axis. What should be the minimum and the maximum we already know. But you don't know how to make what we don't know how. Toe there mark what will be the state step between the these photos. We're going to see this a bit later. It's a very handy future. Let's move to our next topic. 9. Legend - What does this line do?: Our next topic is about legends. What is a legend? Let's see our graph again. We get took photographs in the same boat, but we don't know which is about what This is what the legend is. A legend tells us what each graph represents. Legends are very simple to be created. Of course. It's simply used the command legend and you supply the parameters for it. The parameters that you need to supply outstrips supply are simply strings, which are the names off the each ground. For example. For this example, our first graph is the graph of the first Bjt. And second graf is for our second PJD and we close the rockets into Rungis. And who's and there it is our graph up here in the right corner. Now, I will make a simple change here to show you, um, problem that may happen. Sometimes the problem is not really expressed in this example, but you can see the legend. Ghosts goes over the our graph. And of course, this isn't This isn't good, because we don't know what is happening behind the legend. We can supply a second set off barometers, which defines the position of the legend on our paragraph. The barometer is called location and the values for the parameter are the compass directions Northeast, northwest, south. And so, of course, if we use if we use north, it will be in the upper center. If we use not East Bruce, it will be in the opera corner where it originally Waas. If we have heart west, it will be in the perfect position for our For our example. Let's change this back door what it was. And now our graph is in the perfect position for our example Now worked about the parameters of the legend the first parameters that defined the names off the graphs the way they work. Let's let me run this the way they work. The first name that you give this for the first book, Zaken names for the second book. They go like this. You get four ports and you have four names here. The first name for the first port in the last name. Well before the last part is the way they were. So if we could it want toe change their order. Somehow we have to change the order off the boats that you generate. You can't do it. Otherwise, 10. Multiple Plots Part 1 - Figures: before we move forward, I want toe introduce a new command which is called bigger and what it does. I will show you what did. Thus now if you remove the hold on here, if you remember, were simple. Simply get second. We get some error here from the legend. Let me let me out. All right, way Simply get our last books that we have in our cult because I don't have the cold on nothing told the first block and combined the boats. Now, if you want to have our floats in different windows separate separated we have to use the finger command. The figure command is very simple. You simply give a number to the port figure one, for example here. And he goes to We'll get to windows two fingers, two separate spheres Nothing. They are totally different. The fewer commands are very, very useful. And they can be used to simply to point that which sugar are going to work on now. You can also say Don't here figure one and you can say Let's change the legend legend. I am figure one. If we run this April were it were Rungis not legend title If we run this, the plateau will be changed from this. Just There it is. And as you can see, figure one was now on the top because this is the figure we last worked on. This features a very candy when you're working main many figures and you can simply on which figure you need now. 1234 You can hear us making us you want. 11. Multiple Plots Part 2 - Subplot: I'm going to introduce you the next concept about separating figures and plots. We saw that we can hear different figures in different plots in different windows, different figures that are totally separated. We can also care different plots in the same figure window that are also separated and here and may have nothing in common. The way we do this is by using the command support. I will come on down out these ones for these ones for now, or snow. The way we do this is by using the command support. I will go here and say something block and the support takes at least three parameters and mostly will use only trip parameters. Which, which are the how many rows do you want off? Lots. How many combs? So imagine that it's it's a matrix off plots. How many rows how many columns and which element of dot matrix are working on right now. In our case, we have to ports, and to hear you want to hear two rows with one comb. Turow's one cone and this is our first block. Then go down here to the second block and we say against subplot 21 two. It will run this but our own. No, As you can see again, they're totally different. The formed the front name change that we did the title, the legend. They're separated. The legend is down here, but we don't hear any wire label sex labels. We don't have any titles and no great nothing again, totally different plots, but they're in the same window we can also, if we if we change it, will make it one roll and took cones. Let's see how it's going to look. Run this and again the same thing. They're just clipped. Now let's if you want to it. If we want toe act the same stuff to the second float was simply we can simply copy just on put down here. In this case, we don't need hold on anymore, huh? And that it is not there absolutely the same. Except that this one cast legend, this one doesn't. It's that easy. You can make the support with Let's Make It the Turow's and took Combs. She's the first element toe constant. Let's make this the fourth element. Look at this. We give them in a square grid. You can you have space for two more plots here, if that is what you need 12. Customizing Plots (Advanced) Part 1 - Markers: all right. I will go back a little bit. A So you can see I have removed the plots. We don't need them for now. And I want to talk about markers. We have seen already what the market is, but I'll show you how it can manipulate the marker, its colors, its edge color, its size and more. Now we know that we can't simply put a marker in our graph if we put it here in the block Command And I'm not like this like this and you can see that we get markers on all our intersecting points off our victors. But what if we want to manipulate the markers way used circles? We have circles, and there is a way to change the the edge color off the circle, the inner color off the circle, the size off the circle itself, without changing the size of the wine. We know that if we change this size, the circus are also going to be bigger. But it's doesn't look pretty in itself, not enough. In order to manipulate the markers outside of the plot command. First, we must use a a candle now to use a candle with simply assigned, assigned the blood commands toe variable name. We can say my blood equals blots equals blocks off something. And we should use cynical in dance because my part will now return some value and you want to suppress it. And now, if we wants to change if you want, if we want to work on this plot by using the SEC amount, which we have toe use, which we're going to say now, said said, On my block, the marker to be a circle This is literally what this command means. If we're on this, we're going to get the same result as before, but in a different way. Now what else we can do? We can also say also set the marker edge color. So I don't know, maybe Luke, we're on this. There is just the edge Color now is is now blue. We can also say, said the market face color green, and as you can see, it's very tiny. But now there is a green color inside of the circle, and we can also say now make this market a little bit bigger by saying marker size, Uh, maybe 15. And if we're underst wa. Maybe it's a bit bigger. It's not a perfect circle. Now this may be due toa me using her Lennox. I'm not sure. Ah, we can. We can make it a little bit smaller and let's change this toe yellow. I think that looks. It looks good. It looks good enough now. If you if we change this size here now, we're only changing the age. The age is off the marker, but as you can see, it shrinks the inner. It shrinks the size off the face. Let's go with the face off the market, the one only on which we used the yellow color. So it's not a good idea. You can make it. Maybe make this. Let's make it OK. It's good off now, though. Capture what we just did. We used the handle on the plot command so that we can use more commands on the plot itself , and we waded. Set on my plot, the market to be a circle, said the edge color to bloom and said, the face color to yellow and the size toe 13 off course. You can use all other marker types here. There are no restrictions of course. So this is a This is it about the markers. It's very easy toe work with them and manipulate them. You've simply need to know what he wants to do. 13. Customizing Plots (Advanced) Part 2 - Ticks and Grid Manipulation: All right, guys, this will be a very simple and short video way. Always export the circled dicks that takes on the graphs how we can manipulate them. I have prepared a simple set of values, us two simple factors that I'm going to use to make a lot if it were in the sculpt. Now we'll get this simple, simply a straight line that goes from one dunkers to the other. The chicks are the numbers down. The numbers on the access is so here we have then takes on the Y axis and Identix on the X axis. Every think is with then hired in the biggest one or by going one for the Y axis. We'll see how it can manipulate this. How can make make make the access, gets more or less sticks? What should be the stepped between them and a little bit more. Now let's simplest changing dicks. So, in order in order, money place ticks. We can't use the command set, get current access, and here we have to provide a vector of victor off values that are going to be used for ticks by model up for the given graph that we're working on. So we can simply say, Let's make a victor here. We can say that we want a ticket. Zero articles 25 Gender 100. It weren't. Just consider. We have these sticks. But here we're missing the 75. As you can see, actually, I'm misters And where 75. So if we're on it, All right, you can see the 56 now in committed by 25 because that's how we define them. And rece izing the graph doesn't change this. If you noticed, just a minute. Go. Without this. The techs were changing the panic on the size of the graph. So now we have 0 2040 60 80 100 If we make it a full screen, we'll have them implemented by 10 not by 20. So we're getting giving a let's call them static values for the ticks. By using the this command, no matter what the sizes there there will always be a constant number of critics, the ones with defiance. All right, so this isn't a very convenient Wait a bit, So we will simply use Victor generation like here. So we're going to say from zero incremental, but zero implemented by 25 500. We'll have the same result now If we want, we can change his door five and just can see co many values we have dollar ship under Think to notice that here will start from zero and enter the 100 because these are the Mulan backs in various for our X values. But we also may want toe start from 15 if we don't just Well, okay, the values before 15 removed we have them on the ground, but we don't have a tick on the X axis for them. So in for some reason, you know you need to do this. This is how you do it. Oh, a better way toe. Get the values for the sector off Dicks are to use simply the minimum the minimum off the X values and the maximum off the X survivors. So this way, if for some reason your excellent wife values change, they will automatically be changed for the x tex here. Because if we left them like they were before, from 0 to 100 every time your extra change you here to man mentally change the static and ending point for the X six. So this is a much, much continent way toa do it we can the same result as you can see. But now, if I change my eggs values to go from from zero toe, let's say 1000 incriminated by then we have the same result. But now well, you have so many values because our steps, our step is five. So what we can do is extract the step from here. So it's a extinct steppe. Let's go with this ex. It's called like this extinct, usable toe. Let's make it 15 in this case. So there this much better from 0 to 1000 implemented by 50 every chick. So now everything basically changes automatically. The only thing that you main change is the extinct the X step, because buses are so in some cases, you may get more ticks than you need to hear. All right, let's up our white IQ now with same way said, Get current taxes, White chick. I mean off. Why values? Why don't you get it will make it and marks off wife values and we have to define our why did step It should be zero points zero five and there it is. So we hit a lot more videos on the Y axis as well. We can also, but the great here and we have a much denser grit. The grit also depends on the ticks on the X and Y axis that we have. So if we want to care for a dancer great, we can either use the great minor commander we have. So previously, Oregon's change the density of the ticks on the accesses. So if we if we changed, step here toe 5 500 because the traffic is only one line on the X axis for the great. So this is also another way to control the great Well, I think that this is enough for the X and Y ticks when we get toe three dimensional graph C can also manipulate the Z ticks for the taxes. You get the same way like it did here, but we'll see later in some of the videos. So let's move on 14. Customizing Plots (Advanced) Part 3 - Ticklabel and Lineplots: in this example, we're going toe depature or 12 month period, and the key point of dispense this'll example will be to show you how toe change the Dick LeBeau and how toe draw a line on the both. No, I have prepares. You're the cause that's needed. Before we start. I simply created toe defector Victor's with the temperature and month months, temperature and months, and I have blotted them and given and I have given the water handle, let's from the court and see what we get. This is our graph and let's the I had forgotten about it. And now let's change the extra Kleber now instead of 01234 And so we want to give January, February, March, April, May and so on to do this with superhero refused to set command, given the current taxes and say X tick label. It was say, for example, month and I think yes, all ex felons who have the value off month now it we want to give it more than if you want to give it more than one day. Give them a selector. Now we can say month one and more, and it actually should be a vector color. So if we're in this, they will repeat itself month. Want more Mt want months? I guess you see where is where this is going and to do what they want to reciprocate, to provide 12 values. I have prepared him here so we don't hear toe. You don't have to wait for me to write them. And this is simply a vector cone that he has all the months in itself. It has 12 values from January to December and they're all separated by a cynical. If I run this now, there it is. But it's not actually what we are expected. We here. We're missing health off the months now. What is the reason for just We have only 1237 ticks here toe Help everything we need. We need to set now. The ticker we need to make 12 6 You should remember how to do Just have done it in a previous exercise. We say again said, Get current Access X and we know that we have 12 values. We can't simply say month here at the various for the month. It who work just fine. Oh, we get simply instead of that look like this. It does not matter now. I think to remember when you keep a case like this, you must always keep you must always have the same number of values for the ticks and the same number of palace for the tick labels. Things is the reason why we had the problem assess a minute ago when we didn't have that extra co here. Now we're also going to set the exit even from 1 to 12. And while our graph is perfect, at least regarding the thing values no. And let's put the some labels on our accesses. X label is months. And while labour is degrees, which we're going to use, the special, simple symbol for it we're going to see, say, Degrees and we're going to say Cirque and kept see the circ slash circumstance, for it comes from the LA Texan syntax, which will create a simple ah, simpler, a small circle. You're simply let's see it. There it is. I'm talking about this a small circle here, the degree symbol, Or maybe let's let's called temperature. No Juries. All right. Know what we're going to do next? Uh, one. There are two other things that we can do here, and they are put a legend and we're going toe put. The The average temperature in the legend has a number, and we're also going toe block the average temperature now to get the ever Stamper Sure with simply, say way, simply create a new vector. Them average way said, and to say mean off them. I mean off them will return value the mean value off all values in the temple victor or the simple, the average temperature. Let's run it and see what it will return. All right, so our average temperatures, so it's not a vector. Our average temperature is 13 point something degrees. Let's put the cynical in here. All right, let's create our legend. Our first graph shows the temperature by months, months by months. So we say month de bridge and our 2nd 1 will be victor of values because yours you will see why. All right, so our first starts us average temperature and just our fixed, and the second very that we're going to put in here is the ever step richer itself. But in order to be able to do this. We get to use the command no toe string, which converts a number two strength so that it can be used as text regard to put them our marriage here. And if we're in this, maybe it will work. No, it doesn't yet. It doesn't work because we way we don't have our second bloat yet. Toe in or great the line off the ever step richer, we're going to use the command line and the command command line. Alos also is toe simply to create the line. In order to make the line, we need to pass stars value for X and bottle for X and the same for way. The start value for X will be one and the Enviro group 12. We started one and entered 12 for the white values we will hear then average starting bellow and temp average us ending variable soup because the the line will simply go through one on the one. Why point the average point and let's put some styling in here, uh, line style. We get to say what kind of wine we want. Let's make it the dashed line looks ah, make it well with two and color. All right, let's run this and perfect. I simply love this. We kept our average temperature right here, and we have the value up here in the legend. Isn't that just great? No. We can work a bit on the main block and make and make it look a bit bait. Better. Let's work on the Martin markers. Maybe not black, white, black or let's keep it black and work a bit. Wonderment, markers said on the handle market. Face off each color and marker face, color toe are yellow again. I simply like it and the marker size toe. Let's run this all right. Maybe they're a bit bigger, but big, but it doesn't matter. The last thing that we May wants to work on is the limits on the access is because you have points intersecting points that right on the accesses. And we may not like this. In some cases, we already know how to do this. Where I we're going to change the the limits on the Y axis in this case listed here. Why limb so limb should start up the minimum very off them, minus five miles five and and at the maximum value off temp, close plus fire. That's from this. All right, now, did you see what this did It? Simply a blank space above the maximum value and below the minimum value. It's really handy if you ask me. All right, This is enough for this example. You're so how toe change the tick labels. You saw how to create a lion float and you saw how toe use bellows in your legends. 15. Two Y Axes on a single figure? Call PlotYY! (2D Project): how to toe help a single block with two. Why access and one X axis is so that we can hear through graphs in the same part. But here difference dimensions for them. Different values on the Y axis is We have seen how we can make a support and divides them. But now we're going to see calculated in a single plot. There is a very simple way to do this and we're going to use the command. Look, why now? I am going to common thoughts de sport and use our seconds current Vector the boat, while like a month, takes four parameters, at least as you can see its X one y one x two white home. Now our X vector is in both cases, the vector. So we're going to use it. You, I want you, I toe and if we're just it's there they are. It's not there pretty. And we're going to work on the prettiness now and get to work. Let's just do the basic stuff way. I'm going to move it up here so that I don't have to repeat all my coat again and okay, we have some of the stuff radio. As you can see, the second white access didn't take these changes. It didn't take the phone. Agent takes us in the phone size, didn't they? Any of this? So we have to do something different there, and I will show you what to do. Now, First we must go our candle prints and we have tree candles in just case. It's because the pope y y command earthworms, three different handles. We're going to call them X. This is the first handle y one and y two. Now we put the same call again to suppress the output. And if we're just all right, everything works. Water. Jeez, candles. In this case, the Y one and y two handles are good. We're going to use them to work on the grafts themselves. And if you want to work on the different y accesses, we have used the axe handle. As you can see, the accidental is actually Honore off. Two values off to access is and it we wants toe use the fountain, the phone properties that behave here on the second access as well. We're going to say sit us to the second access from the axe array on. We're going to use the same values that up here I will simply copy paste them and we don't need get access anymore. So we're going to use the X one here. So we're pointing out both of this excesses. And if we're on this, you can see that they both have the correct, uh, phone sizes and forms styles? No. How do we change the label on the second taxes? It's very similar to what we just it we hear toe supply us the second are a second parameter for the wire label command and I'm going ups. I'm going toe do it down here again, X two and we're going to use the same Ah, base, second current. Let's go it like this and do it like this and we can simply to make the are caught look better on more. Just understand the boat. We're going to supply the first access here as well. And if if we're in this, we can see that we have label for our second access as well. No. Ah, let me move the title down here and organized cold of bits. All right, now, this looks much better now What else can we do if he wants to work on the graphs themselves , change their colors, their markers. And so we have to use the set command. And this time we're not going to use the X one or X. True, we're going to use Y one or y two. Now if we want to set the color toe green on the first graph, we're going to say said, Why won't color green and restaurant discord and see what will happen? There it is. It works so called. No, let's do the same for the second graph the color I don't know, maybe yellow. And let's also change the size. I'm going to the top. You're a swell all right. It will start to look a bit better. As you probably already know. Way can change the ticks, the step of the ticks on, both off the accesses. We're going. Teoh is by using the X tick on Dwight stick commands. And to do this again, we're going to say set. But this time we're going to use the X one and X two because we're working, working on the why accesses most the graphs. But the accesses and we're gonna say X one and we're going to say, Why tick? Let's and we have to supply on Andre off values. It's going to start from zero. It's going to increment by is your 0.2 and it's going toe end up zero. Uh, zero point. Well, if we're just you can see that we have our growth. Uh, now the aligns off, the Greeks incriminated by zero points to 0.2 It looks much better now. And we can clearly see if you can simply see our We can simply make our observations much better. Much easier, Weiqing. Much easier. Much easily. Um C And guess what the value off this point on the y axis is access is, for example, but where we can make it even dancer, we can make make neck sticks, even dancer. Let's make it like this. All right, now, let's do the same for the second. Why? Access said x two. Why? From zero. So in current that by zero point toward this time and it answer to the hasbara, here is 150. So let's make it a commitment. 60 and let's run this. All right, is now. We hear far values cut off here. So if we continue like this, it will be a convergent 80 to 100 right? Let's make it 200 up here. All right, Now I can get our graph. Looks so much better now it's simply almost perfect. Now let's work on our X sticks a bit as well Sit. Now we're going to use to get current taxes and say, extinct from zero incremental, but 0.1 and are 0.5 ends up 0.7. Uh, there is just we have to change the limits in the graphs and we're going to do this, all right. The extreme and the wild about here are not working correctly for our graph, we have to moved and blow the whole while I command and similarly to what we just did down here we have to use and down here we have to use the X again for each of the Y axis is so action. Actually, this is should be got x two because the Hazar here is 150 we got use again while I'm off for X one, and it's going to start zero and end at 100 and 10 or 20 in my street. And the extreme stays the same. Let's run days. All right here maybe. All right, let's use a variable for our for our limits. Uh, the X start live zero extent. Leading zero point a, uh, Why one start? Zero. Why toe? Why want end limb Limb Zero are not not the center. It's 100 and 12 hundreds and 20 in months. Three. Why? To start with the raw. Why toe ending them 160 miles tree. And we're going to change all these values here because it gets very, very tedious. Toe maintained, um, updated everywhere. This makes it much easier. Why one start them? Why? To start them. And here, Why toe and live? Why want in Klim and where else? Here, uh, X and living what I want and why toe end? Why? To start them and extort him. Sorry for the time it took to write them. But now it's much easier toe work with them. We simply have to change one value. All right? No, we have some problems with our second twi graph. As you can see it's always stretched out and let's see, what is the problem with this? The problem here is that we should be using the get current taxes here, but should use the accident. The axe itself so way are working on the X Dixon, both for both off the graphs on Dhere up here, we're going toe use exclaim for again, and we're going again to use X one and x two here because the second graf simply the way it was, it was simply stretching out. And it's simply didn't knew that we have new limits for the for the X axis for itself. And it was simply thinking that it's the graph is still from zero point. Whilst was your point point 74 on the X axis? So we're going to do this x one here and x two x two here X lived and limb. It's the same thing. We're going to use the same values for them ex limits. And now, if we were on this Walla, it's simply perfect. Now, very quickly. Let's put ups a few markers up there said, Why want Let's set, um, marker, That is X. Let's through the next, uh marker X color. That will be, Ah, moment, Rex on marker face. Ah, size marker size. It's making 15. Let's copies. All right, Why two marker? Let's make the market here a circle with each color that is blue. And let's put the mark your faith color that this I a moment yellow. We already so that they will looks pretty good. And let's run this there. Ah, it's not the best, I think, but you get the point is very, very, very easy toe work on this stuff. Now I am not just one last thing that we have toe fix, and it's the legend. Virginity. All right, There it is. Everything is perfect. It so it looks really nice. I hope you think you're thinking the same. All right, let's let's put up a few comments just to make our cotton called more worried. Bowl. All right, we're going to have here limit values, limits, values we're going to hear, hear blowfly minutes. Look, properties or hope, maybe grit. Say things. Fourth until a cious grit label. Since just all right, let's help your markers and colors. And here on let's give here the X and Y dicks all right. I think that this is enough for the pop, where I command it's very easy to work it. As you can see it, you get very pretty graphs. If you have some other roofs, it may look even prettier, all right?