As far as I can see, the recommended way of using

pdf()
plot
dev.off()

works precisely, just zoom in far enough so that your screen is able to display the gaps, e.g. by zooming in by 6400%

Uwe Ligges




On 17.04.2012 15:53, Unger, Kristian, Dr. wrote:
Thanks Uwe. Please use the following below to reproduce the problem. Also, find 
the plots as I get them in my Dropbox:

http://dl.dropbox.com/u/42940015/Rplot.pdf (plot as I get it when I use the "save 
as..." function from the Mac GUI menu.
http://dl.dropbox.com/u/42940015/test.pdf (plot using the pdf() function.

There should be red and blue boxes alternating with small white spaces in 
between. Actually neither the pdf from the screen plot nor the pdf() plot show 
exactly what I would expect.

pdf("test.pdf",useDingbats=FALSE)

ytp<- 
c(-89325387,-89216522,-60796604,-58334752,-57765318,-55659470,-55054287,-53883354,-50215659,-50118524,-50072127,-50045267,-49883861,-48749073,-48689425,-48304344,-48232108,-48200930,-47389665,-47334632,-47006453,-46801749,-46779857,-46500741,-34202088,-106271)

ybp<-  
c(-90163070,-89315653,-89212325,-60737864,-58320017,-57748589,-55640346,-54993254,-53873394,-50204330,-50104099,-50064400,-50006459,-49870854,-48727216,-48665687,-48296706,-48221116,-48190704,-47378997,-47321850,-46998634,-46789748,-46765297,-35147449,-33961185)

col<- rep(c("blue","red"),13)

plot(c(0, 200), c(0, -90163070), type= "n", xlab="", ylab="",axes=F)


rect( 35+((p-1)*20), ytp,50+((p-1)*20),ybp,col=col,border=NA,main="hhh")
dev.off()


________________________________

Arbeitsgruppenleiter Integrative Biologie / Head of Integrative Biology Group
Abteilung für Strahlenzytogenetik / Research Unit of Radiation Cytogenetics

Tel.: +49-89-3187-3515

Am 17.04.2012 um 14:47 schrieb Uwe Ligges:



On 17.04.2012 14:35, Unger, Kristian, Dr. wrote:
Thanks Petr. Unfortunately this does not help.


In that case, we need a reproducible example.

Uwe Ligges


Kristian

Am 17.04.2012 um 14:18 schrieb Petr PIKAL:

Hi


Hi there

is it possible that pdfs generated using the pdf() function with default

settings leads to loss of information? I was plotting copy number
changes
from Agilent 180k data in form of rectangles (rect()) while each
rectangle
represents one region of copy number change. When plotting into a pdf I
noticed that some very small rectangles do not appear (even after
extensive zooming) in the pdf using the pdf() function. But they do when

writing the screen output into a pdf using the GUI. Does anyone have
some
advice on this how I can plot pdfs without losing information?

I am not sure if it has something to do with dingbats but you could try
it.

Set

useDingbats=FALSE

in you pdf call.

Regards
Petr


Best wishes

Kristian

R version 2.14.0 (2011-10-31)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] CGHregions_1.12.0 CGHcall_2.14.0    CGHbase_1.12.0    marray_1.32.0
[5] limma_3.10.3      Biobase_2.14.0    DNAcopy_1.28.0    impute_1.28.0

loaded via a namespace (and not attached):
[1] tools_2.14.0

________________________________

Arbeitsgruppenleiter Integrative Biologie / Head of Integrative Biology
Group
Abteilung für Strahlenzytogenetik / Research Unit of Radiation
Cytogenetics

Tel.: +49-89-3187-3515


________________________________
Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de<http://www.helmholtz-muenchen.de>
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess und Dr. Nikolaus Blum
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671

   [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org<mailto:R-help@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.



Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de<http://www.helmholtz-muenchen.de>
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess und Dr. Nikolaus Blum
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671

______________________________________________
R-help@r-project.org<mailto:R-help@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.


________________________________
Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess und Dr. Nikolaus Blum
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671

______________________________________________
R-help@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.

Reply via email to