When I load a map on R's widget (through ggmap
) and run the program directly though R's console, the map gets properly maximized when I maximize the R's window.
The same doesn't happen when I run R through Qt. I am using RInside. Through Qt when I run R, the widget gets shown indeed (with the map on it), but when I maximize the R window, the map does NOT get maximized. It remains the same sized!
It doesn't happen in any particular case. It happens all the time I run R though Qt, and never when I run R through R's console.
What hardware/software information should be presented here?
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
>
Using Qt version 4.7.0
> cat /etc/issue && uname -a
Welcome to openSUSE 11.4 "Celadon" - Kernel \r (\l).
Linux linux-trra 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux
The simplest R program which causes this:
R.parseEvalQ ("library (ggmap); library (raster);");
qtToR ["currentFileName"] = currentFileName;
R.parseEvalQ ("load (file = currentFileName); print (ggmap (mapImageData));");
Could it be possible that X11 server is not properly installed on my system? Or is this a know problem with print
?
Is there any alternative way to get this running properly through ggmap?
![enter image description here][2]
A temporary solution to the problem of map not getting maximized is to set the initial dimensions of X11
server.
X11 (width = 11, height = 11);
This shows a nearly maximized window by default, and the map also gets shown maximized.