Dear list, I am getting an error message with "pin" and I am not quiet sure how to fix it. library(maps) op<-par(mar=c(1,1,1,1)) map(xlim=c(-40,-45),ylim=c(60,65), boundary=T, fill=T, col='gray95')>Error in par(pin = p) :invalid value specified for graphical parameter "pin" par("pin")> par("pin")[1] 8.188889 8.188889 I saved an earlier map in ggplot2 and changed the width & height of my plot window. Is this now affecting my par("pin") values....? ggsave(file="newmap.pdf",width=16,height=9) Thank you, Aurelie
On 12-03-26 7:17 AM, Aurelie Cosandey Godin wrote:> Dear list, > > I am getting an error message with "pin" and I am not quiet sure how to fix it. > > library(maps) > op<-par(mar=c(1,1,1,1)) > map(xlim=c(-40,-45),ylim=c(60,65), boundary=T, fill=T, col='gray95') > >> Error in par(pin = p) : > invalid value specified for graphical parameter "pin" > > par("pin") >> par("pin") > [1] 8.188889 8.188889 > > I saved an earlier map in ggplot2 and changed the width& height of my plot window. Is this now affecting my par("pin") values....? > ggsave(file="newmap.pdf",width=16,height=9) >The problem is your setting for xlim: map() wants xlim[1] < xlim[2]. Perhaps it could give a more informative error message... Duncan Murdoch
Reasonably Related Threads
- Export a plot/figure to excel or word?
- Removal/selecting specific rows in a dataframe conditional on 2 columns
- Combining some duplicated rows & summing one of their column
- Polishing my geom_bar for publication
- Deleting rows dataframe in R conditional to “if any of (a specific variable) is equal to”