Re: [R] No color in plotting
Hi Without some reproducible example you hardly get any answer. if this works library(ggplot2) p <- ggplot(mtcars, aes(wt, mpg)) p + geom_point() the problem is in your data. If it does not, the problem is elsewhere, including broken R installation. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Michael > Artz > Sent: Wednesday, April 13, 2016 8:33 AM > To: r-help@r-project.org > Subject: [R] No color in plotting > > Hi I am having a problem with plot () and ggplot (). When I call one of these > functions, the plotting area starts to look as though it is working, but > nothijg > ever is visible. Unless it was a dendrogram. Woth the bar chart, the > plotting > area just had an x and y axis and nothing else. I tried a bar chart with > ggplot > and i tried to plot a tree result from rpart (). I couldnt see anything > plotted. > Is there some way I should be troubleshooting this? Im thinking its an R > config I did or didnt do. I really have no idea though. > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny pouze jeho adresátům. Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze svého systému. Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat. Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či zpožděním přenosu e-mailu. V případě, že je tento e-mail součástí obchodního jednání: - vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření smlouvy, a to z jakéhokoliv důvodu i bez uvedení důvodu. - a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout; Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany příjemce s dodatkem či odchylkou. - trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve výslovným dosažením shody na všech jejích náležitostech. - odesílatel tohoto emailu informuje, že není oprávněn uzavírat za společnost žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn nebo písemně pověřen a takové pověření nebo plná moc byly adresátovi tohoto emailu případně osobě, kterou adresát zastupuje, předloženy nebo jejich existence je adresátovi či osobě jím zastoupené známá. This e-mail and any documents attached to it may be confidential and are intended only for its intended recipients. If you received this e-mail by mistake, please immediately inform its sender. Delete the contents of this e-mail with all attachments and its copies from your system. If you are not the intended recipient of this e-mail, you are not authorized to use, disseminate, copy or disclose this e-mail in any manner. The sender of this e-mail shall not be liable for any possible damage caused by modifications of the e-mail or by delay with transfer of the email. In case that this e-mail forms part of business dealings: - the sender reserves the right to end negotiations about entering into a contract in any time, for any reason, and without stating any reasoning. - if the e-mail contains an offer, the recipient is entitled to immediately accept such offer; The sender of this e-mail (offer) excludes any acceptance of the offer on the part of the recipient containing any amendment or variation. - the sender insists on that the respective contract is concluded only upon an express mutual agreement on all its aspects. - the sender of this e-mail informs that he/she is not authorized to enter into any contracts on behalf of the company except for cases in which he/she is expressly authorized to do so in writing, and such authorization or power of attorney is submitted to the recipient or the person represented by the recipient, or the existence of such authorization is known to the recipient of the person represented by the recipient. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] No color in plotting
Hi I am having a problem with plot () and ggplot (). When I call one of these functions, the plotting area starts to look as though it is working, but nothijg ever is visible. Unless it was a dendrogram. Woth the bar chart, the plotting area just had an x and y axis and nothing else. I tried a bar chart with ggplot and i tried to plot a tree result from rpart (). I couldnt see anything plotted. Is there some way I should be troubleshooting this? Im thinking its an R config I did or didnt do. I really have no idea though. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Using color and plotting characters in a scatterplot matrix [Newbie Help]
Hello guys, I have this data set that I imported into R using a line: This data set consists of 7 columns. The two important columns are the first one called 'thrust' and the last one called 'amtemp'. jet-read.table(jetthrust.txt, fill=T, head=T) I am making a scatterplot matrix simply using the line pairs(jet) The problem is that in the last column of this file which has a header name 'amtemp' I want to sort out the values. I want values: Under 90: To be called low values In between 90 and 100: To be called medium values Larger than 100: To be called high values Then I want those groups of values to be in different colors and different characters on the scatterplot! I tried many ways, And I think I am stuck. I first tried it on a normal plot using the line. plot(thrust~amtemp,jet, subset=(jet$amtemp90), col=1, pch=11) plot(thrust~amtemp,jet, subset=(jet$amtemp100), col=2, pch=12) plot(thrust~amtemp,jet, subset=(jet$amtemp100), col=3, pch=13) It didnt work because it just took the last plot and overwrite it over the last one :( Someone help please. Thanks in advance. -- View this message in context: http://www.nabble.com/Using-color-and-plotting-characters-in-a-scatterplot-matrix--Newbie-Help--tp21824880p21824880.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Using color and plotting characters in a scatterplot matrix [Newbie Help]
I figured out how to do the rest, the only thing I need to do now is to somehow change the numbers which are 90 to a character string low . The values which are between 100 - 90 to convert to character string medium. And the values larger than 100 to convert to character string high. Then I would use this line. plot(thrust~amtemp, jet, col=as.numeric(jet$amtemp), pch=as.numeric(jet$amtemp)) The thing is that I dont know how to convert those numerical values into low medium and high Hmm, but then when I think about it better if its changed to the strings above, it wont remember the exact numerical value. Basically what I want to do is make a scatterplot and then just change the color and the symbol of those 3 groups so they can be distinguished on the graph. -- View this message in context: http://www.nabble.com/Using-color-and-plotting-characters-in-a-scatterplot-matrix--Newbie-Help--tp21824880p21825882.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Using color and plotting characters in a scatterplot matrix [Newbie Help]
First make a factor with the levels. jet$Classes - factor(ifelse(jet$amtemp 90, low, ifelse(jet$amtemp 100, medium, high))) Then make life easier and use ggplot install.packages(ggplot2) library(ggplot2) ggplot(jet, aes(x = amtemp, y = thrust, colour = Classes)) + geom_point() HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance Gaverstraat 4 9500 Geraardsbergen Belgium tel. + 32 54/436 185 thierry.onkel...@inbo.be www.inbo.be To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher The plural of anecdote is not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens pfc_ivan Verzonden: woensdag 4 februari 2009 8:59 Aan: r-help@r-project.org Onderwerp: Re: [R] Using color and plotting characters in a scatterplot matrix [Newbie Help] I figured out how to do the rest, the only thing I need to do now is to somehow change the numbers which are 90 to a character string low . The values which are between 100 - 90 to convert to character string medium. And the values larger than 100 to convert to character string high. Then I would use this line. plot(thrust~amtemp, jet, col=as.numeric(jet$amtemp), pch=as.numeric(jet$amtemp)) The thing is that I dont know how to convert those numerical values into low medium and high Hmm, but then when I think about it better if its changed to the strings above, it wont remember the exact numerical value. Basically what I want to do is make a scatterplot and then just change the color and the symbol of those 3 groups so they can be distinguished on the graph. -- View this message in context: http://www.nabble.com/Using-color-and-plotting-characters-in-a-scatterpl ot-matrix--Newbie-Help--tp21824880p21825882.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document. The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.