From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vicente Vera Subject: Re: R dependencies Date: Fri, 11 Sep 2015 11:39:33 -0300 Message-ID: References: <87613v43kv.fsf@gnu.org> <87a8t64ph1.fsf@elephly.net> <871teh9ddz.fsf_-_@gnu.org> <8737yw3ti0.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaPUG-0002D1-0T for guix-devel@gnu.org; Fri, 11 Sep 2015 10:39:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaPUE-0003ek-SM for guix-devel@gnu.org; Fri, 11 Sep 2015 10:39:35 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel@gnu.org Hello again, Finally solved this: Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, : X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 2 at size 11 could not be loaded The problem arose because R wasn't using cairo for font rendering. Some simple configurations in ~/.Rprofile solved it: setHook(packageEvent("grDevices", "onLoad"), function(...) grDevices::X11.options(type =3D "cairo", antialias =3D "subpixel")) The code changes the X11 device (used for plotting) type from "XLib" to "cairo", once it gets called. (just for the record, i'm not using GuixSD) 2015-09-03 11:55 GMT-03:00 Vicente Vera : > Hi, > > Sure. The error message is this: > > X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 5 at size > 15 could not be loaded > > No plot is being drawn; only a blank window appears. > > The code: > > ggplot(data =3D fig1, aes(x =3D Var1, y =3D Freq, fill =3D > brewer.pal(length(levels(the_data$VARIABLE1)), "Set3"))) + > geom_bar(stat =3D "identity") + > scale_fill_identity() + > labs(x =3D "x", y =3D "y") + > geom_text(aes(label =3D perc), vjust =3D 2, size =3D 4, colour =3D > "black", fontface =3D "bold") + > scale_x_discrete(labels =3D c("a", "b", "c")) + > theme(panel.background =3D element_blank(), > line =3D element_blank(), > axis.text.y =3D element_blank()) > > On my base system, R 3.2.1 + ggplot2 draws the plot with no problem. > > It might be related to a missing font or font alias in the Guix store > (not familiar enough with it to catch the issue). > > Now, I didn't installed ggplot2 through Guix, so that could be a problem. > > 2015-09-03 3:29 GMT-03:00 Ricardo Wurmus : >> Hi Vicente, >> >>> Going back to the R dependencies topic, I ran across an issue when >>> trying to draw a plot (with ggplot2). But first some context: >>> >>> - I'm not using GuixSD but a binary installation over Manjaro OpenRC; >>> several base packages missing on Guix >>> - I only have other two Guix packages installed: xpdf & abbaye >> >> All Guix packages capture the complete graph of dependencies, so you=E2= =80=99ll >> always end up with the dependent packages in =E2=80=98/gnu/store=E2=80= =99 even if only >> those packages appear in your profile that have been explicitly >> installed. >> >>> - I installed ggplot2 through install.packages("ggplot2") in R (Guix pa= ckage) >> >> Note that ggplot2 has been packaged for Guix: >> >> guix package -i r-ggplot2 >> >>> R complained about some fonts missing, but I think it could be related >>> to a missing X11 dependency (complete Xorg maybe?). What could it be? >> >> What is the exact error message you get? Is any plot drawn at all? >> What is the code you use to draw the plot? >> >> ~~ Ricardo >>