In this R video tutorial, we will learn how to modify and customize plots produced in R (RStudio) to make them look more beautiful! Here we will play around with the plots by changing the size of the plotting characters and fonts, changing the colours in plots, adding a regression line, making different groups stand out by using different colors and plotting characters, producing multiple plots on one screen, removing labels from axes and relabeling them, and more. Here we will learn how to use R functions such as "plot", "cex", "pch", "axis", "par", "mfrow", "col", “font”, and many more.
@amiraa671210 жыл бұрын
Mike Marin, you ROCK!!! Such a talented teacher, thank you SO MUCH for the videos. You absolutely saved me, I was lost and thanks to you I've managed to complete a uni project AND feel like R makes sense- and is fun :)
@marinstatlectures10 жыл бұрын
Thanks so much Amira A , it's really nice to hear you say that!
@nurlantorokeldiev203610 жыл бұрын
Thank you for all Mike. I just downloaded all your instructions. Visual tutorials are much better than sitting and looking into some books
@marinstatlectures10 жыл бұрын
We're happy to hear you find them useful ***** . We prefer that you stream the videos through KZbin as the views and ratings on KZbin allow us to continue development of the video series.
@oacho38 жыл бұрын
More I watch your videos and more I find that they provide exactly what I need, explained at the right pace and with the right attitude and amount of details. For this, once more, thank you!
@marinstatlectures8 жыл бұрын
you're welcome +oacho3 , good to hear they're working for you!
@jhuang5233 жыл бұрын
you singlehandedly helped me finish my senior thesis i owe you my life and my degree sir
@mahmoudomer10925 жыл бұрын
You are smart and using simple clear way in your explanation. Thank you so much.
@juanpablogomez76004 жыл бұрын
This video is beyond great. It is way much more what I was looking for
@tiisetsomashele14947 жыл бұрын
your videos are so helpful Marin, R.Studio makes sense now. Thank you so much
@TimSter155 жыл бұрын
This helped my understanding of R to a better level. Cheers!
@25ships10 жыл бұрын
God bless you, your videos save me from my haunting assignments
@marinstatlectures10 жыл бұрын
Glad we could be of help peaceinnyc ;)
@alessandromarques28754 жыл бұрын
I have had learning a lot with your video. Thanks a lot!
@frederickg.daniel531810 жыл бұрын
You have a great instructional style. Thanks for all the help, just finished up through R Tutorial 2.8
@marinstatlectures10 жыл бұрын
Thanks Frederick G. Daniel , we appreciate you saying that!
@majidosman2864 жыл бұрын
Thank you so much! Clear and very instructive videos. You really helped me a lot.
@annez85986 жыл бұрын
Excellent tutorial and an excellent tool! Many thanks!
@jababnamgay63664 жыл бұрын
very helpful sir. Thank you so much
@lfcladeira5 жыл бұрын
Quick and good, that's how you get me to subscribe!
@marinstatlectures5 жыл бұрын
thanks :) it takes a lot of scripting to get a lot ideas condensed down into a short period of time. the nice thing with videos (when they're pre-scripted) is that i find that something that i would talk about for 30 minutes in lecture i can condense into 7 minutes of video (because live lectures always have a lot of "umms" and things like that, where a video has all of the at cut out )
@tomhuyzen74315 жыл бұрын
Very helpful, thank you!
@giridharreddy51254 жыл бұрын
Thank you , info provided is unique and great. :)
@sagek79494 жыл бұрын
This is very helpful. Thank you
@danireds5068 жыл бұрын
Thank you very much! Excellent information. I do appreciate.
@marinstatlectures8 жыл бұрын
you're welcome +Daniel R. !
@VijayendranRaghavendran9 жыл бұрын
Thanks ever so much Marin. Very useful.
@marinstatlectures9 жыл бұрын
You're welcome +Vijayendran Raghavendran !
@puklixty4 жыл бұрын
simple and well explained
@yangwang68056 жыл бұрын
Thanks for the wonderful video! I have a question: when I use ggplot, are there any ways to change the thickness of the x axis? Thanks!
@melissabittner89648 жыл бұрын
Hi Marin, this is really helpful video. How would I go about changing the xlim with dates (in the %m/%d/%Y format)?
@AshPhoenix5 жыл бұрын
This video is so good!
@marinstatlectures5 жыл бұрын
thanks @LegIsLate!
@poornimavishwaradhya69589 жыл бұрын
Thank you very much Marin.. This video is indeed extremely helpful a great for beginners. I would want to know how to plot time series in r studio for a date which has month and year on x asis & count of requests on y axis. can you pls assist? :)
@janagogova82145 жыл бұрын
This is a real help! BTW. how do you enter percentage on x-axes, as a percentage of the sale? Thanks
@hannalinde44674 жыл бұрын
Great video!! I have a question regarding the X-axis, if we use different columns of data that are labeled "female and male" how can we get that to appear for respective boxplot? How can we make R name the boxplots according to the data we created it from?
@m.noelserra55519 жыл бұрын
Great video! Just one question. How I can do to change the x axis of a DCA? it go from -5 to 5 and I would like to have -2 to 2. thanks!
@marinstatlectures9 жыл бұрын
Hi +Maria Noel Serra , I'm not sure exactly what plotting command you are using for that, but in general, within the plotting argument, you can use *xlim=c(-2,2)* to have the x-axis run from -2 to 2. this will work most of the time, unless you are using some particular package that hasn't built this into the plotting function.
@erikacynthiavilla3311 жыл бұрын
This was so helpful!
@marinstatlectures11 жыл бұрын
Thanks Erika Cynthia Villa !
@VenkyVennyLakshmanGarke11 жыл бұрын
Cool!
@mounadaoudi21755 жыл бұрын
thank you very much very helpful
@marinstatlectures5 жыл бұрын
you're welcome!
@LucasSouza-uo3sd5 жыл бұрын
Muito bom! Melhor vídeo que assisti sobre o tema!
@jenaemillen8 жыл бұрын
super helpful :) thanks
@marinstatlectures8 жыл бұрын
you're welcome +Jenae Millen !
@johngarrigan36017 жыл бұрын
Fantastic video
@cksantiago707010 жыл бұрын
Hi. thank you for your teaching I want to know how to move the main title to the upper left side (most graph which has been published is located in this point)??
@marinstatlectures10 жыл бұрын
Hi chang hyun Kim , sure, that's easy enough to do. there's a few different ways to get that done. 1) in your plot command, set the *adj* argument =0 to have the title on the left, adj=1 to have the title on the right, or any value between 0-1 to dictate where the title goes (0.5 is in the middle). (eg) *plot(x, y, main="Plot Title", adj=0)* will place the title on the left. you can also use the *adj* argument within the *title* command, if you add the title in a separate line of code (eg) *plot(x, y)* and then a separate command for the title *title(Plot Title, adj=0)*
@gaatutube3 жыл бұрын
Where would I get help for what values I can use for cex or font and which number represent italics or bold etc. I could not find that anywhere in the help system.
@johannesdammrath32177 жыл бұрын
Your Videos are great. it's a Little bit sad that the new videoplayer here often hides the line you are coding while the Buttons are displayed ...
@Desireswithin9 жыл бұрын
HI Mike, I have a question. I made a bar plot with categorical values, that are so long(names). How do I adjust their font size, and not the size of my x axis label?
@Jesus24horasTV6 жыл бұрын
9:20 - xlim and ylim !!!! Explained!!
@rishikesh3308 жыл бұрын
Is there any way of plotting a user-defined function in R? I have written a function that takes two variables x and y (although I mean to keep y mostly constant), does some calculation and returns a value. I wish to plot for x values 0 to 10 and y = 20. Any suggestions?
@charleskakilla6 жыл бұрын
Thanks Marin.
@jiangyanyi13458 жыл бұрын
when using plot function, it is plot(Age, Height) and the two variables are separated by comma; bit in boxplot function, it is boxplot(LungCap~Smoke) and two variables are separated by ~. I wonder whether those are fixed rules? Thank you in advance.
@bethanylu95944 жыл бұрын
How do you label the peak value using geom_line and geom_label?
@marcelas792810 жыл бұрын
Hi Mike! Thank you so much for your videos. I want to know how to change the labels of "0" or "1" in a side by side box plot. For example Smoke ~ LungCap, I want to change the "0" to Non smokers and the "1" to Smokers. Thank you
@marinstatlectures10 жыл бұрын
Hi Marcela S , i show this in the video at the 10:30 mark. i do it on a scatterplot, but it is the exact same for a box plot. you just use the *axes=F* in the plotting command, and then use the *axes* command to add axes back in to the plot, and at the values of 1 and 2, you place the labels you want there instead "non-smoke" and "smoke". just take a look at the video starting around 10:30 and you'll see how to do this...just take what is shown and apply it to the box plot command...
@marcelas792810 жыл бұрын
Oh! Ok I see that the same applies for the boxplot. Thank you so much.
@marinstatlectures10 жыл бұрын
No problem at all
@suyin20114 жыл бұрын
Can i change plot's caption to Time New Roman font. Please tell me, Sir. Thank You
@davyraeder5 жыл бұрын
thank you man.
@marinstatlectures5 жыл бұрын
you're welcome!
@bernoGarcia3 жыл бұрын
helpful thank you
@igorped6 жыл бұрын
thank you so much!
@abhisheksahu99454 жыл бұрын
Sir in your plot on x axis there is only three value that is 5, 10, 15 if I want to show more value then how can I do that.
@asiack252310 жыл бұрын
Is there any way to rotate the part of the text modified with cex.axis? E.g. when the labels are so long they cannot be displayed properly and made even smaller?
@marinstatlectures10 жыл бұрын
Hi Asiack , sure that can be done pretty easily. just to clarify, you are asking about rotating the values on the X and/or Y axis, and not the name/label of the axes themselves, correct? if so, you can do this using the *las* argument within the plotting command. (e.g.) for a plot of X and Y, entering *plot(X, Y, las=1)* will rotate the values on the Y-axis (all of the axis-values will be horizontal), entering *plot(X, Y, las=2)* will plot all of the axis-values perpendicular to the axis, and entering *plot(X, Y, las=3)* will rotate the values on the X-axis (all of the axis values will be vertical). its easier to see this in an example, so just enter a plot command, and then view the plot with *las=1*, *las=2* and *las=3* to see what i mean.
@Rain129010 жыл бұрын
HI Mike, Thank you for this video! I just had some questions concerning R plot formatting. First, how do you adjust the aspect ratio of figures (such as adjusting the perimeter of the plot boxes), including when having multiple plots (using "mfrow")? Second, do you know how to label your figures at the bottom left (such as a), b), c), etc.)? Finally, for creating multiple lines on the same plot, how do you produce different line types on the same plot (i.e. solid, dotted, etc.), and then make that consistent in the legend? Thank you, and your response would be greatly appreciated!
@marinstatlectures9 жыл бұрын
Hi Rain1290 , the easiest way to change the aspect ratio is by clicking on the "Export" tab in the plotting window in RStudio. they "copy to clipboard", and once you're in there you'll see you can set the aspect ratio in the boxes provided, or just click/drag the plot to change the aspect ratio manually. i've got a video on adding text to a plot, including adding text/titles in different areas of the margins, so ill direct you to that as its easier than trying to explain in words here: kzbin.info/www/bejne/kKmWf6amrp2mrdU and for changing the line types, you use the *lty=1* argument in the plotting command, and change the value to change the line type. 1=solid line, 2=dashed line, etc. I've also got a video on how to add a legend, and change the line types in the legend, so you can take a look at that: kzbin.info/www/bejne/o3OWmoambpKChsU
@Rain12909 жыл бұрын
Thank you very much, Marin - I really, really appreciate your help with this! Just one last question - if I wanted to use the "mtext" function, is it possible to shift the text farther below the x-axis, and then slightly to the left? Thanks, again, Marin! ~Trav.~
@marinstatlectures9 жыл бұрын
Hi Rain1290 , yeah, you can do that...you can do just about anything in R, it's just a matter of knowing how to tell R what you want to do. in the *mtext* command, you can use the *adj* argument to move text along the axes....setting *adj=1* puts the text all the way to the right end of the axis, and *adj=0* puts it all the way to the left. similarly, the *padj* argument can be used to move text away from the axis, with a value of 0 putting it right on the axis, which is the default. a value of 1 pshes the text away form the axis, a value of 2 punches it away even further. play around with the values until you find the position you think the text looks best in (e.g.) *mtext("Put This",side=1, adj=0.3, padj=0.75)*
@Rain12909 жыл бұрын
Thank you so much, Marin! Indeed, everything worked out, at your suggestion! Many, many thanks, once again! ~Trav.~
@marinstatlectures9 жыл бұрын
No problem, glad to hear it all went smoothly!
@saikumarmv12507 жыл бұрын
Excellent....
@junhuijiang61079 жыл бұрын
Mark it: how to arrange plotting (watched the first half) Thanks the Video producer Mike!
@ios32765 жыл бұрын
Hi Marin! Thank you so much for this tutorial It has been very useful to complete my analyses! I am doing a logistic regression with R, and thanks to section No.7 of this tutorial I learning to set the axes as I needed. To re-labeling the axes I am using axes=F, but some how the Y axis still in the graph and I am not able delete it. Any suggestion? Thank you so much!
@marinstatlectures5 жыл бұрын
without seeing any code, it is difficult to know. *plot(x,y, axes=F)* should not plot any of the axes. the only thing i can suggest without knowing more is to check our a video we have on "modifying plots" which should help with changing axes, etc: kzbin.info/www/bejne/ooGyhKqcrbKXacU
@johnl.56046 жыл бұрын
Thank you!
@yati489 жыл бұрын
Hi Marin, great tutorial and also thanks to your lecture that teach to create scatterplot, my problem has been solved! :) Then, now I want to ask why my attribute for x or y has this 1e+06, 1e+04 and so on? It is the value for this attribute too big? I hope you understand my question. :)
@marinstatlectures9 жыл бұрын
Hi +Ros Yati , thanks, we appreciate that. and I'm sorry, but i do not understand your question. please try to clarify, and provide a bit more detail, and i can try to help you out.
@yati489 жыл бұрын
+MarinStatsLectures okay, like this, i have attribute for x - Followers, y- Following. In this case, Followers value has 1e+06, 1e+04 and so on..It should be follow on my follower value, right? not 1e+06, 1e+04 and so on.
@speed21ization7 жыл бұрын
How do you perform 2 kernel density plots on one graph?
@poojarathod36523 жыл бұрын
How can we calculate or display area under histogram in R?
@anshulsharma3439 жыл бұрын
Hey marin, firstly thnx for ur lecs, they're extremely helpful. i wish to ask you whether: par(mfrow=c(1,1)) hold any specific significance. i'm asking this because if we just want to create a new single plot we can do it even without this command. however i do understand why this would be important when we have more than single columns
@marinstatlectures9 жыл бұрын
Hi +anshul sharma , that's correct. it useful for changing the number of plots you can see one screen, (e.g.) c(1,2) will make the plotting screen 1 row, 2 columns...and allow you to haver 2 plots side by side. hope that clarifies it.
@zhoufang58510 жыл бұрын
Hi, Mike, I have a question. When I was using the "lables" commend, why there are some warning showed in the console which called ""lables" is not a graphical parameter"? Thank you!
@marinstatlectures10 жыл бұрын
Hi Zhou Fang , it is because you've spelled labels incorrectly. the command is *labels*, and you've typed "lables".
@zhoufang58510 жыл бұрын
MarinStatsLectures OMG!Missspelling. Thank you for your helping!
@marinstatlectures10 жыл бұрын
No problem Zhou Fang !
@Nallenoodles10 жыл бұрын
Hello Marin! I have this question: I am given data on 220 observations with 27 variables. Two of those variables are "Primary school completion rate for females" and "Primary school completion rate for males." I'd like to put these in a single graph and show their relationship. Is that possible? If it is, how is it done? Your videos are amazing and have helped me use the tools in R with more ease :) Thank you for your time!
@marinstatlectures10 жыл бұрын
Hi Nallenator20 , of course, just about anything is possible to get done in R. but I'm a bit unclear on your question. what are you plotting these against? or is it that the completion rate for males/females are not variables, but a summary of a variable? (e.g.) when you say one of the variables is "completion rate for males", this suggests that you have a completion rate for each of the 220 observations? or is it that one of your variables is completion (yes/no), and you have calculated a summary for it which is the completion rate for males and for females? please try and clarify your question and i can try to help you out...it sounds like you may be using the term "variable" incorrectly, which may be what is causing the confusion?
@Nallenoodles10 жыл бұрын
I'm given data on 220 countries. There are 7 seven different categories that give some insight about each country. Two of those categories are "Primary school completion rate of females" and "Primary school completion rate of males." I'd like to compare these side-to-side and see what conclusions I can make. I hope this clarifies a little more, I'm not very good at statistics :( Thank you for your response! Means a lot!
@tradewindm9 жыл бұрын
Hi, thank you for the video, it has already helped me a great deal! I just wanted to know, is it possible to alter the font of the x axis only and not both like demonstrated here? I have a classical example where I am plotting species as the x axis, so I would like to change the font to italic on the x axis only. I haven't found an answer anywhere online so I am starting to wonder whether it is possible in the first place! Thank you
@marinstatlectures9 жыл бұрын
Hi +tradewindm , i don't know of an easy way to get it done, but i can't think of a work-around to get it done... in this video, i show how to produce a plot with no x/y axis labels, and then add them in later. you can follow how to do this in this video, and only add in the y-axis labels. we also have a video *"Adding Text to Plots"* which shows how to add text to the margins of plots using the *mtext* command. you can use this to manually add in each of the x-axis labels, in an italicized font. you can add in all of the x-axis labels manually using this command repeatedly. its not the optimal way of doing it, but it will allow you to get it done, if you can't find a better way of doing it. good luck!
@Koekwouspb6 жыл бұрын
Hello I have a question, I want to mirror the y-axis, so that the negative y-values are above the x -axis and the positive Y-values beneath. Do you know how to do this?
@marinstatlectures6 жыл бұрын
there's a few ways to do this...here's the most straight forward way: *plot(x,y, ylim = rev(range(y)))* ylim= the y-axis limits, and rev=reverse, so it will if you wanted to have specific values for the y-axis, e.g. to run from +10 up to -10, then use: *plot(x,y, ylim = c(10,-10))*
@Ageraacs2 жыл бұрын
I'm having issue with filtering by 'gender' on my data set, i run the command but I get the error that 'the object' does not exist My data set I am working on was imported as an .xlsx file, I can create a plot based on two columns just fine but it will not allow me to filter by a third.
@SunilKumarBCL7 жыл бұрын
how can we give alternate colours to the plot? Any idea sir!
@Rain129010 жыл бұрын
Hello, Thank you so much for this demonstration. I just have one question - do you happen to know how to adjust the length and/or height of figures when specifying rows and columns? For example, right now, I am using the three rows and one column scenario (i.e. (3,1) for my figures, but when using it, by default, R makes the figure as an elongated rectangle. As such, I would like to shrink it in such a way that it becomes similar in shape to other figures that I've created. Is this possible? If so, any information that you can share would be greatly appreciated. I've tried the "asp" or "mar" and "oma" functions, but it does not seem to modify the figures the way I want it. Thanks, ~Trav.~
@marinstatlectures10 жыл бұрын
Hi Rain1290 , sure, if i understand correctly, what you want is to have the 3 plots stacked on top of each other, but to keep the individual plots as squares, not elongated rectangles, so that the aspect ratio of the individual plots is not thrown off? if so, its pretty simple, and won't involve any R commands... in the plotting screen, click on *"Export"*, and from there click *"Copy Plot to Clipboard"*. from there, you get the plot in its own separate window, and you can resize it there. you can do this by changing the values of the height/width, but whats easier, is to just re-size using the tab on the bottom right corner of the plot, by using this to stretch/squish the plot. once you got it as you want it, just copy or save it from there.
@Rain129010 жыл бұрын
Thank you so, so much, MarinStatsLectures, for your diligent and informative reply! I really appreciate it! Yes, your advice truly helped me in modifying the plots to sizes that I had desired. I cannot believe that it was that simple - I spent literally hours trying to look for relevant commands online (and using R help), but none seemed to get the job done! Once again, thank you so very much for your assistance. ~Trav.~
@marinstatlectures10 жыл бұрын
you're welcome, happy to help!
@shaneh65610 жыл бұрын
How do you add keep points you've added to a graph if you go back and change the basic plot? For example, I plotted one cell type initially, the added 4 more. I had to change things on my initial first plot, yet all the point() or lines() I added disappeared. Also, how do connect points you've added or show show points on lines you've added without using the two arguments one after another?
@marinstatlectures10 жыл бұрын
Hi Shane Houston , that's how it is. you make the plot, and then can add points/lines to it. if you submit another plot command, it over-writes the previous plot, so you will have to add the lines/points back in. its easiest if you keep the plotting commands in a script, so that you can easily re-submit them if you have made adjustments. that's usually how it goes...you make the plot, and then want to revise something on it, and so you go back to making the initial plot with the changes, and add back in the other lines, points, etc. you can look at my video on using scripts if you wanted to see more about what i mean there: (Working With Scripts in R (R Tutorial 1.9)) . you can connect points by including a *type="l"* argument in the points command...that is a lower-case L in the quotations. for example *points(x,y, type="l")*. worth noting that the line will be connected to points in the order that they are in X. for example, the line will go from (x1,y1) to (x2,y2) and so on. so you should make sure that the X and Y are in the order you want points to be connected in.
@shaneh65610 жыл бұрын
That's exactly the information I needed MarinStatsLectures, thanks for such a quick reply!
@marinstatlectures10 жыл бұрын
You're welcome!
@mariajosevillacis50394 жыл бұрын
Hey, how can I modify the size of a forest plot? I try it with the functions of the video, but it doesnt work!
@paraskevikoliou50086 жыл бұрын
Could you please show me these on qqplot ? if i wanna do it in ggplot how exactly i have this result? (rename the numbers in x-axis)
@meghna4549 жыл бұрын
Hi, I’m working on a project where I need to make a line plot with the weekdays on x-axis, and a numeric variable on the y axis. But the plot command simply gives me a box plot, while i am looking for a scatterplot. Is it because I had to work to get the weekdays, and the class of weekdays is “ordered””factor”? Can you please help? Thank you
@marinstatlectures9 жыл бұрын
Hi +Meghna Mathur-Varma , yes, it is because R sees the days as a factor, and so it makes a box plot, comparing the numeric variable for each of the days using box plots. heres one way you can get around this. first, plot the Y variable against a vector of 1,2,3,..,7 (for the seven days of the week). use the *type="l"* in the plot command to have the points attached using a line. in the plotting command, also use the *axes=F* command to not have the axes labelled. and then relabel the axes using the *axis* command. where you have 1,2,...,7 on the x-axis, you will replace these with a "mon", "tues",...,"sun". in this video, if you start watching at about the 10:00 minute mark, i show how to relabel the X and Y axis. you can do this, and just make the necessary modifications for your plot.
@falcoperegrinus8211 жыл бұрын
How do you insert error bars into a scatter plot? I'm totally stumped on how to do this!
@marinstatlectures11 жыл бұрын
Hi falcoperegrinus82, i can try to help but can you refine your question a bit so its a bit clearer to me what you're trying to do? the concept of an error bar for a scatterplot does not make sense. error bars are generally attached to a mean (or some other point estimate), and a scatterplot does not display the mean of either of the variables. if you are thinking of the regression line as the mean of y given x, and you want to attach error bars or a confidence interval for the regression line itself, you can do this using the "predict" command and then the "lines" command to add in the confidence lines.
@falcoperegrinus8211 жыл бұрын
MarinStatsLectures Sorry, I did not realize you replied until just now. I had a simple plot of a series of a data points against time where the last couple points were averages and I wanted to put bars above and below those points to show +/- SD.I figured out how to do it: I used the "errbar" function after downloading the hmisc package.
@falcoperegrinus8211 жыл бұрын
MarinStatsLectures BTW thanks anyway. Your videos are really excellent.
@marinstatlectures11 жыл бұрын
falcoperegrinus82 Thanks for the compliment and thanks for watching!
@sch45829 жыл бұрын
Hi Mike,Can you please help me in plotting multiple values in single graph on its X-axis.
@marinstatlectures9 жыл бұрын
Hi suraj kumar , im a bit unclear on what yo mean by saying "on its X-axis". I'm providing an answer here that assumes that you want to make a plot of x1 vs. y1, and then add x2 vs. y2, and so on, on the same plot, with the same X and Y axis. to do so, one way is to use the following: plot(x1,y1) points(x1,y1,type="l") points(x2,y2,col=2) points(x2,y2,col=2, type="l") The first command make the plot, using points, for x1 and y1. the second command connects the points using a line. the third command adds in the points for x2 and y2, using a different colour. the next command connects those points using a line. you will probably need to set the x and y limits (using *xlim* and *ylim*) to make sure that points don't go off the plot. you can modify this as necessary, but this is the basics of how to add more points to an existing plot. if you make your question a bit more clear, i can try to answer more specific (e.g.) when you say to add multiple values on a single graph, its unclear what you mean by that....a plot of x vs y has multiple values on a single graph...so if you can more clearly state what you want to do, i can provide a better, more specific answer.
@sch45829 жыл бұрын
MarinStatsLectures Hi, Thank you for your prompt reply. My question is I'm having some csv files like user1....10.csv and they are all same but number of elements in the columns are different. I would like to plot graph for one Column in all the files we've(user1...10) let's say User1,2,3...10$GSRvalue in one graph. Because I've to compare all the values of the GSR in every file by one graph(on X-axis). Thank you!!!
@marinstatlectures9 жыл бұрын
Hi suraj kumar , ok, the commands i mentioned in my previous comment can be used to do this, just replacing x1,y1 x2,y2 and so on, with the user1, user2, and so on x and y values for the plot. just take what i mentioned earlier, and modify it for your variables/data.
@larryjohn82469 жыл бұрын
Mike, I'm a new R user whose found your videos very helpful, but I've run into a problem with plotting. I'm using R 3.0.2 in Windows 7. While I was trying to change the title of a QQplot today, R superimposed the old and new titles. Then, when I tried to simply re-create the Q-Q plot, R said "Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet." I'm now stuck. I tried closing and re-opening R, but the error persists. Got any ideas?
@SuperChrizie7 жыл бұрын
Want to know how to plot certain rows in a column
@pankajdey20539 жыл бұрын
Hi, I want to know how to change the intervals of the X axis in the plot
@marinstatlectures9 жыл бұрын
Hi +Pankaj Dey, i show how to do this starting at 10:20 of the video. and you can also change the x limits for the x-axis using the *xlim* command as well.
@pankajdey20539 жыл бұрын
Thank you Marin..
@JustMe-pt7bc11 жыл бұрын
Very useful.. but I want to plot multiple line chart .. Can you plz help..
@marinstatlectures11 жыл бұрын
Hi Rose Petals, can you clarify what you mean by "multiple line chart"? you can use the "lines" command to add multiple lines to a single plot, or the "mfrow" command to have multiple plots appearing on one plotting screen, but i'm not sure if either of these is what you mean by "multiple line chart"
@benaazomar852910 жыл бұрын
I have used the same data , but i have a very few dottes in the plot?! What could be the reason? thanks
@marinstatlectures10 жыл бұрын
Hi Benaaz Omar , it's tough to say from a distance. if you've used the same data as in the videos, then your plot should look exactly the same. you've either made an error when reading the data into R (id suggest checking things like *dim(LungCapData)*, to check the number of rows/columns of the data, and make sure it is correct), or you've made an error in producing the plot (id suggest checking your code to make sure it matches exactly with what is shown in my video). but with only the info that "your plot looks different" its tough to say what error you've made. hope the above helps you troubleshoot your error.
@benaazomar852910 жыл бұрын
MarinStatsLectures Hi, Mike, thank you so much. you are great,really helpful videos
@marinstatlectures10 жыл бұрын
you're welcome Benaaz Omar !
@chakrireddy4 жыл бұрын
how to change font type??
@mandeepbaluja54017 жыл бұрын
Love you
@EdvanAguiarEA7 жыл бұрын
When I use this command: plot(cars$speed, cars$dist, xlab = "Speed", ylab = "Distance", main = "Scatterplot"), It works. But, when I try to use: plot(speed~dist, main="Scatterplot"), it does not work. What am I doing wrong?
@1991tushar6 жыл бұрын
use attach() function to avoid dollar sign
@williamavila2419 жыл бұрын
the font argument it does not work with boxplot the font argument it does not work with boxplot?
@anilkumaragrawal61275 жыл бұрын
par(mfrow=c(1,1)) is not working
@parkz77304 жыл бұрын
i would wan to change my plot of angle to 90 degree , someone pls HELP!!!
@sanichristopher87469 жыл бұрын
Hello, Please am new to R programming and my lecturer gave me this assignment please am kind of lost can you help me with the codes. This is the question: The scholarship board of your state desire to offer scholarship to 60 student from your state. One of the requirement for scholarship is that the student must be between age 17-19 years. Out of the several applications, 5000 students where qualified and they are between the ages of 17-19 years. Write a combine R programming code to compute and print. 1. Mean age of the qualified students 2. Modal age of the 5000 students.
@univ41soukahras4810 ай бұрын
thanks sir for this great video, I want to know how to change the size and type of writing inside (inside the circle of acp) when i excute these lines s.class(valirgpca$li, irrg$design$site, starSize = 1.2, ppoints.cex = 1.2, xlim = c(-4, 8), ylim = c(-2, 4), col = TRUE) s.class(valirgpca$li, irrg$design$season, starSize = 1.5, ppoints.cex = 1.5, xlim = c(-4, 8), ylim = c(-2, 4), col = TRUE) plot(betsite, row.pellipses.col = adegpar()$ppalette$quali(7), ppoints.cex = 1.5) The text inside the graphic is small and cannot be read. I have tried size.cex, cex , But to no avail, I hope to help me