Displaying 4 results from an estimated 4 matches for "plot_shad_f".
2010 Nov 22
1
plot inside function does not work
...ne I get my plot.
Then I tried to use another function as depicted_below to do some calculation before calling the function that does the plotting.
plot_shad_map<-function(f,CRagent,agentid){
for (i in c(1:nrow(shad_map))){
for (j in c(1:ncol(shad_map))){
# Do something
}
}
plot_shad_f(shad_map) # This plots fine when used in command line. But inside this #function does not
return(shad_map)
}
Unfortunately I get no plot . What might be the problem?
One more question how to get more plots at the same time. It seems that when I issue a new plot replaces the old plot.
I would l...
2011 May 10
1
ggplot2 and add circle
Dear all,
today I have writted the following code,
to plot the contents of some matrices I have
plot_shad_f
function(f){
library(ggplot2)
dev.new()
plotdata<-melt(f)
names(plotdata)<-c('x','y','z')
v<-ggplot(plotdata, aes(x, y, z = z))
print(v + geom_tile(aes(fill=z)))
}
I would like to ask your help add a small circle in this plotting. What would be the eas...
2010 Nov 20
2
Merge two ggplots
...ession shorter
ggplot((data.frame(x=CRX,y=CRY,sr=agent$sr)))+
geom_point(aes(x,y,colour=cut(sr,c(0,-10,-20,-30,-40,-50,-60,-70,-80))))+
geom_text(aes(x,y,color=cut(sr, c(0,-10,-20,-30,-40,-50,-60,-70,-80)), label=round(sr,3)),vjust=1,legend=FALSE)+labs(colour="CRagents[[i]]$sr")
}
plot_shad_f<-function(f){
library(ggplot2)
plotdata<-melt(f)
names(plotdata)<-c('x','y','z')
v<-ggplot(plotdata, aes(x, y, z = z))
v + geom_tile(aes(fill=z))
}
The first plot puts points and texts below the points... in an area
while the second function in the...
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...ne I get my
plot.
Then I tried to use another function as depicted_below to do some
calculation before calling the function that does the plotting.
plot_shad_map<-function(f,CRagent,agentid){
for (i in c(1:nrow(shad_map))){
for (j in c(1:ncol(shad_map))){
# Do something
}
}
plot_shad_f(shad_map) # This plots fine when used in command line. But
inside this #function does not
return(shad_map)
}
Unfortunately I get no plot . What might be the problem?
One more question how to get more plots at the same time. It seems that when
I issue a new plot replaces the old plot.
I would l...