Home › Forums › PDF/raster › PDF/R For who and where?
- This topic is empty.
- AuthorPosts
- Kevin Neal
Anyone interested in PDF/R should view this recorded webinar on the topic: https://youtu.be/BzWTJo_7jng
Below is a snippet on the important topic of “PDF/R For who and where?”
1. can be used everywhere as modern TIFF and JPEG replacement
2. scanner, printer, MFP, smartphone, digital camera
3. image processing workflows
4. mobile & cloud applications
5. e-GovernanceRoberto CavallliR allows you to directly save your graphics in PDF. You can choose the dimensions of the file and obtain the desired quality. To do this, simply use the pdf function. The numerous arguments of the function allow you to choose numerous parameters: ?pdf.
An example:setwd(“D:/R/image”) #on choisit le répertoire
#pour l’exemple on trace la croissance radiale d’une plante
host<-function(t){5/(1+1000*exp(-1.18*t^0.4))}
time<-c(0:200)# on utilise la fonction pdf avant le graphique
pdf(“croissance_plante.pdf”, height=10,width=10) #les tailles sont à 7 par défaut
#on trace le graphique
par(mar=c(4, 6, 2, 1),cex.lab=1.3,cex.axis=1.2)
plot(host(time)~time,type=’l’,lwd=4.5,col=”grey”,ylab=”Plant radius (cm)”,
xlab=””,ylim=c(0,5))
abline(h=1.1,col=’gray10′,lty=3)
abline(v=50,col=’gray10′,lty=3)
abline(h=3.15,col=’grey’,lty=3)
abline(v=100,col=’grey’,lty=3)
arrows(100,1.1,100,3.15,col=’red’,lwd=4,code=3)
arrows(50,1.1,100,1.1,col=’black’,lwd=4,code=3)#on ferme le graphique
dev.off()
#le pdf se situe dans votre répertoire
Note that it is possible to save your graphics in many formats using similar functions like jpeg(), tiff(), png(), bmp()….
- AuthorPosts