Šumniki v grafu A. Blejec May 31, 2011
Contents 1
Sprememba kodiranja
1
2
pdf.encoding
3
References
1
5
Sprememba kodiranja > Sys.getlocale()
[1] "LC_COLLATE=Slovenian_Slovenia.1250;LC_CTYPE=Slovenian_Slovenia.1250;LC_MO
Za pisanje šumnikov v grafe je treba nastaviti vrsto kodiranja za pdf grafe. Privzeta vrednost je ’Latin1’ (Western), potrebujemo pa ’Latin2’, (Eastern). > pdf("bla.pdf", encoding = "ISOLatin2") ˇas---ˇ ˇŠŽ", ylab = "C ˇaˇ > plot(1:10, xlab = "C cšžC ckarija") > dev.off() null device 1
1
10
●
●
8
●
6
●
●
●
4
Čačkarija
●
●
2
●
●
2
4
6
8
10
Čas−−−蚞ȊŽ
sweave O tem sta v Rnews pisala tudi Murrell and Ripley (2006) Non-Standard Fonts in PostScript and PDF Graphics by Paul Murrell and Brian Ripley http://www.r-project.org/doc/Rnews/Rnews_2006-2.pdf
2
2
pdf.encoding
V Sweave lahko uporabimo izbiro pdf.encoding:
10
ˇas---ˇ ˇŠŽ", ylab = "C ˇaˇ > plot(1:10, xlab = "C cšžC ckarija")
●
●
8
●
6
●
●
4
●
●
●
2
Čačkarija
●
●
2
4
6
8
Čas−−−蚞ȊŽ
3
10
Lahko pa kodiranje nastavimo tudi splošno za cel dokument: Tole ne dela prav
10
ˇas---ˇ ˇŠŽ", ylab = "C ˇaˇ > plot(1:10, xlab = "C cšžC ckarija")
●
●
8
●
6
●
●
4
●
●
●
2
Cackarija
●
●
2
4
6
8
10
Cas−−−cšžCŠŽ
po nastavitvi \SwaeveOpts{pdf.encoding=ISOLatin2} pa so velja nastavitev kodiranja za vse grafe ˇas---ˇ ˇŠŽ", ylab = "C ˇaˇ > plot(1:10, xlab = "C cšžC ckarija")
4
10
●
●
8
●
6
●
●
●
4
Čačkarija
●
●
2
●
●
2
4
6
8
10
Čas−−−蚞ȊŽ
References Murrell, P. and B. Ripley (2006, May). Non-standard fonts in PostScript and PDF graphics. R News 6(2), 41–47. 2
5
SessionInfo Windows XP (build 2600) Service Pack 3 • R version 2.10.0 (2009-10-26), i386-pc-mingw32 • Locale: LC_COLLATE=Slovenian_Slovenia.1250, LC_CTYPE=Slovenian_Slovenia.1250, LC_MONETARY=Slovenian_Slovenia.1250, LC_NUMERIC=C, LC_TIME=Slovenian_Slovenia.1250 • Base packages: base, datasets, graphics, grDevices, methods, splines, stats, utils • Other packages: Hmisc 3.7-0, patchDVI 1.5, survival 2.35-8 • Loaded via a namespace (and not attached): cluster 1.12.1, grid 2.10.0, lattice 0.18-3, tools 2.10.0 Project path: C:/_Y/R/!KrNeki
View as vignette Project files can be viewed by pasting this code to R console: > projectName <-"!KrNeki"; > > > + > +
mainFile <-"HowTo-UporabaSumnikovVGrafu"
commandArgs() library(tkWidgets) openPDF(file.path(dirname(getwd()), "doc", paste(mainFile, "PDF", sep = "."))) viewVignette("viewVignette", projectName, file.path("../doc", paste(mainFile, "RNW", sep = ".")))
Revision Id: Sweave.Rnw 39 2010-05-25 22:22:19Z ABlejec
6
(c) A. Blejec