[R] help with graphing -- Points in my graph are not apparent, always displayed in steps

David Winsemius dwinsemius at comcast.net
Mon Dec 14 00:29:22 CET 2009


On Dec 13, 2009, at 6:06 PM, philip robinson wrote:

>
> Sorry to have not provided enough information in my prior post. Here  
> is a
> summary of the calculation set that I am doing. The histograms have  
> changed
> since my last post, but I am not so concerned about them. The  
> scatter plots
> do not show all of the points, they seem to round off to the most  
> common.

You seem to think that qqplots should be giving you scatterplots. That  
is not the case. The qqplot function gives you quantile-quantile plots  
and you have given it arguments that implied that temp$R2SC was a  
theoretical distribution to which you wanted to compare the  
distribution of temp$words

If you want scatterplots, then this would be the way forward:

plot(x=temp$words, y=temp$R2SC, ylab="With Rules applied SC",  
xlab="Number of
  Words",col="blue",main="Subordinating Conjunctions\n(Number of  
Words)")

Or perhaps with some jitter and smaller points to separate identical  
values:

plot(x=temp$words,y=jitter(temp$R2SC, factor=2.3), cex=0.1, ylab="With  
Rules applied SC",xlab="Number of   
Words",col="blue",main="Subordinating Conjunctions\n(Number of Words)")

And given the failure of even that plot to separate the points in that  
2.9 MB file, then perhaps look at density plot strategies.

-- 
David.

> I
> have tried doctoring the  http://n4.nabble.com/file/n963172/ESTATS  
> ESTATS
> file to get a different result, but received no change.
>
>
>
>
> removeOutliers<-function(dataset){
> 	return(
> 		dataset[
> 			max(sort(dataset$words)[1:(length(dataset$words)/100)])<dataset 
> $words &
> 		
> dataset$words<(min(sort(dataset$words)[(99*length(dataset$words)/ 
> 100):length(dataset$words)])+1),,
> 			]
> 		)
> 	};
>
> edat.src<-read.csv("ESTATS",head=TRUE,sep="\t");
>
>
> edat<-removeOutliers(edat.src);
>
> # Only address the subset where there exists appropriate  
> conjunctions within
> the sentence
> temp<-edat[edat$R2SC>0,,]
>
> png("egraph_rules_list_2.png",width=800,height=700,res=72);
> par(mfrow=c(2,2));
>
> #	graph that i am having trouble with, it does not seem to reflect  
> the data
> #	The scatter plots are not recognizing all of the data
> qqplot(x=temp$words,y=temp$R2SC,ylab="With Rules applied  
> SC",xlab="Number of
> Words",col="blue",main="Subordinating Conjunctions\n(Number of  
> Words)");
> hist(temp$words,col=heat.colors(max(temp$words)),main="Subortinating
> Conjunctions \n-- Number of Words");
> temp<-edat[edat$R2CC>0,,]
> qqplot(x=temp$words,y=temp$R2CC,ylab="With  Rules applied  
> CC",xlab="Number
> of Words",col="purple",main="Coordinating Conjunctions\n(Number of  
> Words)");
> hist(temp$words,col=heat.colors(max(temp$words)),main="Coordinating
> Conjunctions \n-- Number of Words");
> dev.off();
>
>
>
>
> David Winsemius wrote:
>>
>>
>> You provide no data. This is a guess, therefore. You have used a hist
>> call that has a ratio as the argument and were expecting it to be
>> interpreted as a formula.
>>
>>
>
> -- 
> View this message in context: http://n4.nabble.com/help-with-graphing-Points-in-my-graph-are-not-apparent-always-displayed-in-steps-tp961629p963172.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list