Polygon edge not found

3,410 views
Skip to first unread message

tf21211

unread,
Mar 8, 2011, 6:34:35 PM3/8/11
to ggplot2
I'm trying the examples from the ggplot2 book and everything is
fine in a Windows environment, but on my Mac it steadfastly refuses to
do anything--consistently it says: Error in grid.Call("L_textBounds",
as.graphicsAnnot(x$label), x$x, x$y, :
Polygon edge not found

git://gist.github.com/861358.git has my best effort at sending a
reproducible example.

Thanks for any help.

Brandon Hurr

unread,
Mar 9, 2011, 3:46:20 AM3/9/11
to tf21211, ggplot2
Hi,


> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

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

other attached packages:
[1] ggplot2_0.8.9 proto_0.3-8   reshape_0.8.3 plyr_1.2.1   

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



I get a graph, not a crash. You should check your installation of R and ggplot2. 



Brandon


--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

dsmaller.png

Brandon Hurr

unread,
Mar 23, 2011, 4:10:26 AM3/23/11
to ggplot2, r-si...@r-project.org
Sadly, I don't know anything more about your error. Perhaps someone in the group or on SIG-MAC can help. 

Brandon

---------- Forwarded message ----------
From: tf21211 <tf2...@gmail.com>
Date: Tue, Mar 22, 2011 at 17:26
Subject: Re: Polygon edge not found
To: Brandon Hurr <brando...@gmail.com>


Thanks for confirming I have a problem in my installation. I have
scoured as best I can to find what's wrong with my installation, but
as of yet to no avail. I'm still unable to get any output to the
quartz device using qplot or ggplot. I'm using the latest versions
(some later than what show in your sessionInfo()).

One suggestion I got was to clean out font caches, which I did using
Font Finagler, but to no avail.

Bottom line is I'm still stuck--if you have any suggestions on what I
might try I would be very grateful indeed. Thanks.

# sessionInfo()
# R version 2.12.2 (2011-02-25)
# Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

# locale:
# [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

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

# other attached packages:
# [1] ggplot2_0.8.9 proto_0.3-8 reshape_0.8.4 plyr_1.4



On Mar 9, 4:46 am, Brandon Hurr <brandon.h...@gmail.com> wrote:
> Hi,
>
> > sessionInfo()R version 2.12.2 (2011-02-25)

>
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] grid      stats     graphics  grDevices utils     datasets
> methods   base
>
> other attached packages:
> [1] ggplot2_0.8.9 proto_0.3-8   reshape_0.8.3 plyr_1.2.1
>
> loaded via a namespace (and not attached):
> [1] tools_2.12.2
>
> I get a graph, not a crash. You should check your installation of R
> and ggplot2.
>
> Brandon
>
> On Tue, Mar 8, 2011 at 23:34, tf21211 <tf21...@gmail.com> wrote:
> > I'm trying the examples from the ggplot2 book and everything is
> > fine in a Windows environment, but on my Mac it steadfastly refuses to
> > do anything--consistently it says: Error in grid.Call("L_textBounds",
> > as.graphicsAnnot(x$label), x$x, x$y,  :
> >  Polygon edge not found
>
> > git://gist.github.com/861358.git has my best effort at sending a
> > reproducible example.
>
> > Thanks for any help.
>
> > --
> > You received this message because you are subscribed to the ggplot2 mailing
> > list.
> > Please provide a reproducible example:http://gist.github.com/270442
>
> > To post: email ggp...@googlegroups.com
> > To unsubscribe: email ggplot2+u...@googlegroups.com
> > More options:http://groups.google.com/group/ggplot2
>
>
>
>  dsmaller.png
> 19KViewDownload

tf21211

unread,
Mar 23, 2011, 6:10:33 PM3/23/11
to ggplot2
1) Thanks to all who helped.
2) Problem is resolved, though the smoking gun hasn't been retrieved.
If anyone else encounters this problem, however, the approach I used
to arrive at a solution may be of interest
--create a new user (likely with admin rights) and verify that the
problem doesn't exist for that user (do a clean install of R and run
the code to confirm all is well)
--assuming things are good, compare contents of user/Library/
FontCollections, and consider removing "extras" in the user account
that doesn't work
--Font Finagler was suggested as a tool to clean font caches--unsure
if this is belt/suspenders/necessary or not, but just in case ...

Or, just do the work in the new user account if that suits your style,
and you don't want to take a chance on cleaning things out of the one
where things don't work.

Likely my problem arose from using setup assistant or whatever the
utility is to transfer from one mac to another, but maybe not.

Bottom line is I can proceed now with ggplot2 on the mac, finally.

On Mar 8, 7:34 pm, tf21211 <tf21...@gmail.com> wrote:
> I'm trying the examples from the ggplot2 book and everything is
> fine in a Windows environment, but on my Mac it steadfastly refuses to
> do anything--consistently it says: Error in grid.Call("L_textBounds",
> as.graphicsAnnot(x$label), x$x, x$y,  :
>  Polygonedge not found

Sviatoslav Kendall

unread,
Sep 12, 2016, 6:12:49 PM9/12/16
to ggplot2
I have an interesting use case to report that may prove useful despite the fact that I am using a more obscure package, ComplexHeatmap rather than ggplot2.

I encountered the familiar error message,

Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  : 
  polygon edge not found

while attempting to run an R script that worked without issue when supplied a slightly different set of inputs. This important because it proves that, in this case at least, the error message is not caused by having out-of-date packages, disabled fonts, or a malfunctioning R graphics device. 

In my case, the cause of the error was that a complex graphing function was attempting to match values listed in two different input files. One input file was a table containing gene names in the header (some of which contained "-"), the other was an ordered list of the same genes that was used to specify how the table should be plotted. R's read.table() function changes dashes to periods when it finds them in a table's header so for me the error was being caused by R trying to match a string like "HLA-DOA" in a data structure that contained a string like "HLA.DOA". I solved the problem by changing the dashes to periods in the ordered list input file.

Hope someone finds this useful. 
Reply all
Reply to author
Forward
0 new messages