[Tikzdevice-bugs] tikz: remove "white frame" around plot?
Matthieu Stigler
matthieu.stigler at gmail.com
Fri Sep 9 12:00:55 CEST 2011
Hi
Just wanted to come back on this question: do you see also the white
frame with the code above? Do you know how one could get rid of it?
Thanks!
Matthieu
Le 07/09/2011 09:50, Matthieu Stigler a écrit :
> Hi
>
> I am using R 2.13 and tikzDevice 0.6.1 (see below for full sesionInfo).
>
> Here would be full reproducible code:
>
> library(ggplot2)
> library(tikzDevice)
>
> part1_main70bis<-rgb(0.05,0.4,0.5,maxColorValue=1)
> theme_update(
> plot.background = theme_rect(fill = part1_main70bis,
> colour=part1_main70bis)
> )
> options(tikzLatexPackages=c("\\usepackage{tikz}","\\usepackage{color}\n\\definecolor{part1}{rgb}{0.05,0.4,0.5}\n\\pagecolor{part1}\n"))
> tikz(standAlone=TRUE)
> qplot(1,1)
> dev.off()
>
> It is this white border I would like to remove, do you see it? The
> guilty line is this one (line 13):
> % \fill[color=fillColor,] (0,0) rectangle (505.89,505.89);
>
> Thanks!
>
> Matthieu
>
> > sessionInfo()
> R version 2.13.1 (2011-07-08)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
> [5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=en_US.utf8
> [7] LC_PAPER=fr_FR.UTF-8 LC_NAME=fr_FR.UTF-8
> [9] LC_ADDRESS=fr_FR.UTF-8 LC_TELEPHONE=fr_FR.UTF-8
> [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=fr_FR.UTF-8
>
> attached base packages:
> [1] grid stats graphics grDevices utils datasets methods
> [8] base
>
> other attached packages:
> [1] ggplot2_0.8.9 proto_0.3-9.2 reshape_0.8.4 plyr_1.6
> [5] tikzDevice_0.6.1 filehash_2.2 rkward_0.5.6
>
> loaded via a namespace (and not attached):
> [1] tools_2.13.1
>
> Le 07/09/2011 01:40, Charlie Sharpsteen a écrit :
>> On Tue, Sep 6, 2011 at 9:13 AM, Matthieu Stigler
>> <matthieu.stigler at gmail.com <mailto:matthieu.stigler at gmail.com>> wrote:
>>
>> Hi
>>
>> I am trying to get a plot with the same background color than the
>> background color of the LaTeX page. However, it seems that
>> tikzDevice is introducing by default a command:
>>
>> \definecolor[named]{fillColor}{rgb}{1.00,1.00,1.00}
>> \fill[color=fillColor,] (0,0) rectangle (238.49,238.49);
>>
>> I searched around to see how to remove this line... did not
>> find... is there any way to remove it? The problem is that using
>> ggplot2, I try to control this frame color from within ggplot2:
>> theme_update(
>> plot.background = theme_rect(fill = part1_main70bis,
>> colour=part1_main70bis)
>> )
>>
>> but this is overriden by tikz :-(
>>
>> Any idea? Thanks!!
>>
>> Matthieu
>>
>>
>> Which version of R and which version of tikzDevice are you using?
>>
>> -Charlie
>
More information about the Tikzdevice-bugs
mailing list