Hi Dear Users, I abonden ggplot2 adventure for the moment because of urgent results (i will of course will do this with ggplot2 because I would like to use ggplot2 much more than standart plots). But this time I came across with a different problem. Problem is different graphical outputs from screen and copy-paste. -3s to 3s texts at the desired points on the screen but only 3s text at the desired points on the copy-past to a word or another document. dput for d.oran; structure(list(Tarih = structure(c(12784, 12785, 12786, 12787, 12788), class = "Date"), EUROUSD = c(1.37820047639547, 1.37321712373714, 1.36448946153273, 1.35276621058894, 1.33879335902757), USDJPY = c(1.03465373983692, 1.02726827581633, 1.02488359667201, 1.02672163689113, 1.03386973180077 ), EUROJPY = c(1.42596027714759, 1.41066238702292, 1.39844286695672, 1.38891433806688, 1.38413793103448)), .Names = c("Tarih", "EUROUSD", "USDJPY", "EUROJPY"), row.names = c(NA, 5L), class = "data.frame") dput for d.oran.ist; structure(list(x_bar = c(1.34056134982583, 0.990969887720573, 1.32651605042546, NA, NA), std_sap = c(0.0873935814603307, 0.137574609058213, 0.189820046956369, NA, NA)), .Names = c("x_bar", "std_sap"), row.names = c("EUROUSD", "USDJPY", "EUROJPY", "NA", "NA.1"), class = "data.frame") Both of these data frames are in function frames. And this my user function that produces these plots (it produces 3 plots for 3 exchange rates) and both 3 plots do the same thing. function(veri) { require(reshape2) d.oran<-data.frame(veri[,1],veri[,2]/veri[,4],veri[,4]/veri[,3],veri[,2]/veri[,3]) colnames(d.oran)<-c("Tarih","EUROUSD","USDJPY","EUROJPY") dput(d.oran[1:5,]) x_bar<-colMeans(d.oran[,2:4]) std_sap<-apply(d.oran[,2:4],2,sd) d.oran.ist<-data.frame(x_bar,std_sap) colnames(d.oran.ist)<-c("x_bar","std_sap") dput(d.oran.ist[1:5,]) d.oran<-melt(d.oran,id="Tarih") d.oran$variable<-factor(d.oran$variable) #print(x_bar) #print(std_sap) print(d.oran.ist) print(d.oran[1:5,]) renkler<-c("red","blue","green","orange") for(i in 1:3) { dev.new() # Here, I tried windows() too but nothing changed gecici<-subset(d.oran,variable==levels(d.oran$variable)[i]) plot(gecici$Tarih,gecici$value,main=levels(d.oran$variable)[i],type="l",ylim=c(d.oran.ist[i,1]-3*d.oran.ist[i,2]-.05,d.oran.ist[i,1]+3*d.oran.ist[i,2]+.05)) #segments(min(gecici$Tarih),d.oran.ist[i,1]+seq(-3,3,1)*d.oran.ist[i,2],max(gecici$Tarih),d.oran.ist[i,1]+seq(-3,3,1)*d.oran.ist[i,2]) abline(h=d.oran.ist[i,1]+seq(-3,3,1)*d.oran.ist[i,2],col=renkler[4-abs(seq(-3,3,1))],lty="dashed") for(z in -3:3) { y<-d.oran.ist[i,1]+z*d.oran.ist[i,2] if(z!=0) {text(min(gecici$Tarih),y,substitute(paste(z,sigma)),cex=.85,pos=3,offset=-.0001)} #else {text(min(gecici$Tarih),y,substitute(paste(mu)),cex=.85,pos=2,offset=1)} } #plot() } } I really appreciate your valuable time make for me, and nice advices. Thanks to everybody for sharing experiences and knowledge, Levent TERLEMEZ. [[alternative HTML version deleted]]
Hi I am not sure what do you want to achieve. I would change your text function {text(min(gecici$Tarih)+0.1,y,paste(z,"sigma"),cex=.85,pos=3)} and instead of copy paste you can open and close appropriate device (pdf, jpg or emf - from devEMF package) Cheers Petr> -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Levent > TERLEMEZ > Sent: Monday, January 05, 2015 9:23 AM > To: r-help ?[r-help at r-project.org]? > Subject: [R] What is the problem now? > > Hi Dear Users, > > I abonden ggplot2 adventure for the moment because of urgent results (i > will of course will do this with ggplot2 because I would like to use > ggplot2 much more than standart plots). But this time I came across > with a different problem. > Problem is different graphical outputs from screen and copy-paste. -3s > to 3s texts at the desired points on the screen but only 3s text at the > desired points on the copy-past to a word or another document. > > > dput for d.oran; > > structure(list(Tarih = structure(c(12784, 12785, 12786, 12787, > 12788), class = "Date"), EUROUSD = c(1.37820047639547, > 1.37321712373714, > 1.36448946153273, 1.35276621058894, 1.33879335902757), USDJPY > c(1.03465373983692, > 1.02726827581633, 1.02488359667201, 1.02672163689113, 1.03386973180077 > ), EUROJPY = c(1.42596027714759, 1.41066238702292, 1.39844286695672, > 1.38891433806688, 1.38413793103448)), .Names = c("Tarih", "EUROUSD", > "USDJPY", "EUROJPY"), row.names = c(NA, 5L), class = "data.frame") > > > dput for d.oran.ist; > structure(list(x_bar = c(1.34056134982583, 0.990969887720573, > 1.32651605042546, NA, NA), std_sap = c(0.0873935814603307, > 0.137574609058213, > 0.189820046956369, NA, NA)), .Names = c("x_bar", "std_sap"), row.names > = c("EUROUSD", > "USDJPY", "EUROJPY", "NA", "NA.1"), class = "data.frame") > > > Both of these data frames are in function frames. And this my user > function that produces these plots (it produces 3 plots for 3 exchange > rates) and both 3 plots do the same thing. > > > function(veri) > { > require(reshape2) > d.oran<- > data.frame(veri[,1],veri[,2]/veri[,4],veri[,4]/veri[,3],veri[,2]/veri[, > 3]) > colnames(d.oran)<-c("Tarih","EUROUSD","USDJPY","EUROJPY") > dput(d.oran[1:5,]) > x_bar<-colMeans(d.oran[,2:4]) > std_sap<-apply(d.oran[,2:4],2,sd) > d.oran.ist<-data.frame(x_bar,std_sap) > colnames(d.oran.ist)<-c("x_bar","std_sap") > dput(d.oran.ist[1:5,]) > d.oran<-melt(d.oran,id="Tarih") > d.oran$variable<-factor(d.oran$variable) > #print(x_bar) > #print(std_sap) > print(d.oran.ist) > print(d.oran[1:5,]) > renkler<-c("red","blue","green","orange") > for(i in 1:3) > { > dev.new() # Here, I tried windows() too but nothing changed > gecici<-subset(d.oran,variable==levels(d.oran$variable)[i]) > > plot(gecici$Tarih,gecici$value,main=levels(d.oran$variable)[i],type="l" > ,ylim=c(d.oran.ist[i,1]-3*d.oran.ist[i,2]- > .05,d.oran.ist[i,1]+3*d.oran.ist[i,2]+.05)) > #segments(min(gecici$Tarih),d.oran.ist[i,1]+seq(- > 3,3,1)*d.oran.ist[i,2],max(gecici$Tarih),d.oran.ist[i,1]+seq(- > 3,3,1)*d.oran.ist[i,2]) > abline(h=d.oran.ist[i,1]+seq(- > 3,3,1)*d.oran.ist[i,2],col=renkler[4-abs(seq(-3,3,1))],lty="dashed") > for(z in -3:3) > { > y<-d.oran.ist[i,1]+z*d.oran.ist[i,2] > if(z!=0) > > {text(min(gecici$Tarih),y,substitute(paste(z,sigma)),cex=.85,pos=3,offs > et=-.0001)} > #else > {text(min(gecici$Tarih),y,substitute(paste(mu)),cex=.85,pos=2,offset=1) > } > } > #plot() > } > } > > > I really appreciate your valuable time make for me, and nice advices. > Thanks to everybody for sharing experiences and knowledge, > > Levent TERLEMEZ. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.
Hi cc to list, others can have further comments substitute is superfluous see results of substitute(paste(z,sigma) paste(z,sigma) substitute(paste(z,"sigma") paste(z,"sigma") Cheers Petr> -----Original Message----- > From: Levent TERLEMEZ [mailto:lterlemez at anadolu.edu.tr] > Sent: Monday, January 05, 2015 10:47 AM > To: PIKAL Petr > Subject: YNT: What is the problem now? > > Hi Petr, > > Thanks, i will look at it. Can I learn the cause of problem if it is > not detailed? > > Levent. > > ________________________________________ > Kimden: PIKAL Petr [petr.pikal at precheza.cz] > G?nderildi: 05 Ocak 2015 Pazartesi 11:25 > Kime: Levent TERLEMEZ; r-help ?[r-help at r-project.org]? > Konu: RE: What is the problem now? > > Hi > > I am not sure what do you want to achieve. > > I would change your text function > > {text(min(gecici$Tarih)+0.1,y,paste(z,"sigma"),cex=.85,pos=3)} > > and instead of copy paste you can open and close appropriate device > (pdf, jpg or emf - from devEMF package) > > Cheers > Petr > > > > -----Original Message----- > > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of > Levent > > TERLEMEZ > > Sent: Monday, January 05, 2015 9:23 AM > > To: r-help ?[r-help at r-project.org]? > > Subject: [R] What is the problem now? > > > > Hi Dear Users, > > > > I abonden ggplot2 adventure for the moment because of urgent results > > (i will of course will do this with ggplot2 because I would like to > > use > > ggplot2 much more than standart plots). But this time I came across > > with a different problem. > > Problem is different graphical outputs from screen and copy-paste. - > 3s > > to 3s texts at the desired points on the screen but only 3s text at > > the desired points on the copy-past to a word or another document. > > > > > > dput for d.oran; > > > > structure(list(Tarih = structure(c(12784, 12785, 12786, 12787, > 12788), > > class = "Date"), EUROUSD = c(1.37820047639547, 1.37321712373714, > > 1.36448946153273, 1.35276621058894, 1.33879335902757), USDJPY > > c(1.03465373983692, 1.02726827581633, 1.02488359667201, > > 1.02672163689113, 1.03386973180077 ), EUROJPY = c(1.42596027714759, > > 1.41066238702292, 1.39844286695672, 1.38891433806688, > > 1.38413793103448)), .Names = c("Tarih", "EUROUSD", "USDJPY", > > "EUROJPY"), row.names = c(NA, 5L), class = "data.frame") > > > > > > dput for d.oran.ist; > > structure(list(x_bar = c(1.34056134982583, 0.990969887720573, > > 1.32651605042546, NA, NA), std_sap = c(0.0873935814603307, > > 0.137574609058213, 0.189820046956369, NA, NA)), .Names = c("x_bar", > > "std_sap"), row.names = c("EUROUSD", "USDJPY", "EUROJPY", "NA", > > "NA.1"), class = "data.frame") > > > > > > Both of these data frames are in function frames. And this my user > > function that produces these plots (it produces 3 plots for 3 > exchange > > rates) and both 3 plots do the same thing. > > > > > > function(veri) > > { > > require(reshape2) > > d.oran<- > > > data.frame(veri[,1],veri[,2]/veri[,4],veri[,4]/veri[,3],veri[,2]/veri[ > > , > > 3]) > > colnames(d.oran)<-c("Tarih","EUROUSD","USDJPY","EUROJPY") > > dput(d.oran[1:5,]) > > x_bar<-colMeans(d.oran[,2:4]) > > std_sap<-apply(d.oran[,2:4],2,sd) > > d.oran.ist<-data.frame(x_bar,std_sap) > > colnames(d.oran.ist)<-c("x_bar","std_sap") > > dput(d.oran.ist[1:5,]) > > d.oran<-melt(d.oran,id="Tarih") > > d.oran$variable<-factor(d.oran$variable) > > #print(x_bar) > > #print(std_sap) > > print(d.oran.ist) > > print(d.oran[1:5,]) > > renkler<-c("red","blue","green","orange") > > for(i in 1:3) > > { > > dev.new() # Here, I tried windows() too but nothing changed > > gecici<-subset(d.oran,variable==levels(d.oran$variable)[i]) > > > > > plot(gecici$Tarih,gecici$value,main=levels(d.oran$variable)[i],type="l" > > ,ylim=c(d.oran.ist[i,1]-3*d.oran.ist[i,2]- > > .05,d.oran.ist[i,1]+3*d.oran.ist[i,2]+.05)) > > #segments(min(gecici$Tarih),d.oran.ist[i,1]+seq(- > > 3,3,1)*d.oran.ist[i,2],max(gecici$Tarih),d.oran.ist[i,1]+seq(- > > 3,3,1)*d.oran.ist[i,2]) > > abline(h=d.oran.ist[i,1]+seq(- > > 3,3,1)*d.oran.ist[i,2],col=renkler[4-abs(seq(-3,3,1))],lty="dashed") > > for(z in -3:3) > > { > > y<-d.oran.ist[i,1]+z*d.oran.ist[i,2] > > if(z!=0) > > > > > {text(min(gecici$Tarih),y,substitute(paste(z,sigma)),cex=.85,pos=3,off > > s > > et=-.0001)} > > #else > > > {text(min(gecici$Tarih),y,substitute(paste(mu)),cex=.85,pos=2,offset=1 > > ) > > } > > } > > #plot() > > } > > } > > > > > > I really appreciate your valuable time make for me, and nice advices. > > Thanks to everybody for sharing experiences and knowledge, > > > > Levent TERLEMEZ. > > > > > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at 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.________________________________ 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.
On Jan 5, 2015, at 2:46 AM, PIKAL Petr wrote:> Hi > cc to list, others can have further comments > > substitute is superfluous > > see results of > > substitute(paste(z,sigma) > paste(z,sigma) > substitute(paste(z,"sigma") > paste(z,"sigma")Perhaps this would be more instructive (after adding back the missing parentheses): sigma=2; for( z in -:1 ){ print( substitute(paste(z,sigma)) ) print( paste(z,sigma) ) print( substitute(paste(z,"sigma")) ) print( paste(z,"sigma") ) ; cat("\n")} I don't know if `substitute` is so much superfluous as incompletely called. I would have thought the code might be: substitute( paste(z, sigma), list=(z=z) ) # puts value of z into the expression Or perhaps: substitute( z == sigma, list=(z=z) ) Or: bquote( .(z) == sigma) Assuming the goal were to label a plot with the value of z in a plot at a particular location. The relevant help pages are: ?expression ?substitute ?bquote ?plotmath ?text Best; David.> > Cheers > Petr > >> -----Original Message----- >> From: Levent TERLEMEZ [mailto:lterlemez at anadolu.edu.tr] >> Sent: Monday, January 05, 2015 10:47 AM >> To: PIKAL Petr >> Subject: YNT: What is the problem now? >> >> Hi Petr, >> >> Thanks, i will look at it. Can I learn the cause of problem if it is >> not detailed? >> >> Levent. >> >> ________________________________________ >> Kimden: PIKAL Petr [petr.pikal at precheza.cz] >> G?nderildi: 05 Ocak 2015 Pazartesi 11:25 >> Kime: Levent TERLEMEZ; r-help ?[r-help at r-project.org]? >> Konu: RE: What is the problem now? >> >> Hi >> >> I am not sure what do you want to achieve. >> >> I would change your text function >> >> {text(min(gecici$Tarih)+0.1,y,paste(z,"sigma"),cex=.85,pos=3)} >> >> and instead of copy paste you can open and close appropriate device >> (pdf, jpg or emf - from devEMF package) >> >> Cheers >> Petr >> >> >>> -----Original Message----- >>> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of >> Levent >>> TERLEMEZ >>> Sent: Monday, January 05, 2015 9:23 AM >>> To: r-help ?[r-help at r-project.org]? >>> Subject: [R] What is the problem now? >>> >>> Hi Dear Users, >>> >>> I abonden ggplot2 adventure for the moment because of urgent results >>> (i will of course will do this with ggplot2 because I would like to >>> use >>> ggplot2 much more than standart plots). But this time I came across >>> with a different problem. >>> Problem is different graphical outputs from screen and copy-paste. - >> 3s >>> to 3s texts at the desired points on the screen but only 3s text at >>> the desired points on the copy-past to a word or another document. >>> >>> >>> dput for d.oran; >>> >>> structure(list(Tarih = structure(c(12784, 12785, 12786, 12787, >> 12788), >>> class = "Date"), EUROUSD = c(1.37820047639547, 1.37321712373714, >>> 1.36448946153273, 1.35276621058894, 1.33879335902757), USDJPY >>> c(1.03465373983692, 1.02726827581633, 1.02488359667201, >>> 1.02672163689113, 1.03386973180077 ), EUROJPY = c(1.42596027714759, >>> 1.41066238702292, 1.39844286695672, 1.38891433806688, >>> 1.38413793103448)), .Names = c("Tarih", "EUROUSD", "USDJPY", >>> "EUROJPY"), row.names = c(NA, 5L), class = "data.frame") >>> >>> >>> dput for d.oran.ist; >>> structure(list(x_bar = c(1.34056134982583, 0.990969887720573, >>> 1.32651605042546, NA, NA), std_sap = c(0.0873935814603307, >>> 0.137574609058213, 0.189820046956369, NA, NA)), .Names = c("x_bar", >>> "std_sap"), row.names = c("EUROUSD", "USDJPY", "EUROJPY", "NA", >>> "NA.1"), class = "data.frame") >>> >>> >>> Both of these data frames are in function frames. And this my user >>> function that produces these plots (it produces 3 plots for 3 >> exchange >>> rates) and both 3 plots do the same thing. >>> >>> >>> function(veri) >>> { >>> require(reshape2) >>> d.oran<- >>> >> data.frame(veri[,1],veri[,2]/veri[,4],veri[,4]/veri[,3],veri[,2]/veri[ >>> , >>> 3]) >>> colnames(d.oran)<-c("Tarih","EUROUSD","USDJPY","EUROJPY") >>> dput(d.oran[1:5,]) >>> x_bar<-colMeans(d.oran[,2:4]) >>> std_sap<-apply(d.oran[,2:4],2,sd) >>> d.oran.ist<-data.frame(x_bar,std_sap) >>> colnames(d.oran.ist)<-c("x_bar","std_sap") >>> dput(d.oran.ist[1:5,]) >>> d.oran<-melt(d.oran,id="Tarih") >>> d.oran$variable<-factor(d.oran$variable) >>> #print(x_bar) >>> #print(std_sap) >>> print(d.oran.ist) >>> print(d.oran[1:5,]) >>> renkler<-c("red","blue","green","orange") >>> for(i in 1:3) >>> { >>> dev.new() # Here, I tried windows() too but nothing changed >>> gecici<-subset(d.oran,variable==levels(d.oran$variable)[i]) >>> >>> >> plot(gecici$Tarih,gecici$value,main=levels(d.oran$variable)[i],type="l" >>> ,ylim=c(d.oran.ist[i,1]-3*d.oran.ist[i,2]- >>> .05,d.oran.ist[i,1]+3*d.oran.ist[i,2]+.05)) >>> #segments(min(gecici$Tarih),d.oran.ist[i,1]+seq(- >>> 3,3,1)*d.oran.ist[i,2],max(gecici$Tarih),d.oran.ist[i,1]+seq(- >>> 3,3,1)*d.oran.ist[i,2]) >>> abline(h=d.oran.ist[i,1]+seq(- >>> 3,3,1)*d.oran.ist[i,2],col=renkler[4-abs(seq(-3,3,1))],lty="dashed") >>> for(z in -3:3) >>> { >>> y<-d.oran.ist[i,1]+z*d.oran.ist[i,2] >>> if(z!=0) >>> >>> >> {text(min(gecici$Tarih),y,substitute(paste(z,sigma)),cex=.85,pos=3,off >>> s >>> et=-.0001)} >>> #else >>> >> {text(min(gecici$Tarih),y,substitute(paste(mu)),cex=.85,pos=2,offset=1 >>> ) >>> } >>> } >>> #plot() >>> } >>> } >>> >>> >>> I really appreciate your valuable time make for me, and nice advices. >>> Thanks to everybody for sharing experiences and knowledge, >>> >>> Levent TERLEMEZ. >>> >>> >>> >>> [[alternative HTML version deleted]] >>> >>> >> >>David Winsemius Alameda, CA, USA