Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8947619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:48:41+00:00 2026-06-15T12:48:41+00:00

I’m trying to load and plot a layer from a simple shapefile. It is

  • 0

I’m trying to load and plot a layer from a simple shapefile. It is state boundaries in the US. I can load it fine:

> library("sp","rgdal")

> shape = readOGR("/home/username/data/share/mapnik/world_boundaries/states_EPSG4326.shp", layer="states_EPSG4326")

    OGR data source with driver: ESRI Shapefile 
    Source: "/home/username/data/share/mapnik/world_boundaries/states_EPSG4326.shp", layer:       "states_EPSG4326"
    with 2895 features and 9 fields
    Feature type: wkbPolygon with 2 dimensions

But it fails to plot:

> plot(shape)

There were 50 or more warnings (use warnings() to see the first 50)
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: Path drawing not available for this device
2: Path drawing not available for this device
3: Path drawing not available for this device
...

What am I missing? Nothing shows up in the plot window. There is only the single layer in this shapefile. I could plot it in qgis, which I am trying to find an alternative for. R seems like a popular choice, but I’m not having much luck so far. I googled this warning, but did not turn up anything useful.

Edit:
This same response is received with every shape file I have tried. Here is a shapefile that I have verified responds the same way:

http://dds.cr.usgs.gov/pub/data/nationalatlas/statep010_nt00798.tar.gz

Here is the output of sessionInfo():

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C         LC_TIME=C           
 [4] LC_COLLATE=C         LC_MONETARY=C        LC_MESSAGES=C       
 [7] LC_PAPER=C           LC_NAME=C            LC_ADDRESS=C        
[10] LC_TELEPHONE=C       LC_MEASUREMENT=C     LC_IDENTIFICATION=C 

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

other attached packages:
[1] rgdal_0.7-22 sp_1.0-2    

loaded via a namespace (and not attached):
[1] grid_2.15.2     lattice_0.20-10 tools_2.15.2 

Also this is a gentoo system, the following use flags are enabled on dev-lang/R:

  • X icu java jpeg nls openmp png readline tiff

The following use flags are not enabled (capabilities not compiled):

  • -bash-completion -cairo -doc -lapack -minimal -perl -profile -static-libs -tk”

The only two that look suspicious to me are cairo and tk, are they needed for plotting?

I ran R from the terminal with similiar, but not exactly the same results:

> shape = readOGR("/home/username/Downloads/state/statep010.shp", layer="statep010")
OGR data source with driver: ESRI Shapefile 
Source: "/home/username/Downloads/state/statep010.shp", layer: "statep010"
with 62 features and 9 fields
Feature type: wkbPolygon with 2 dimensions
> plot(shape)
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In polypath(x = mcrds[, 1], y = mcrds[, 2], border = border,  ... :
  Path drawing not available for this device
2: In polypath(x = mcrds[, 1], y = mcrds[, 2], border = border,  ... :
  Path drawing not available for this device
3: In polypath(x = mcrds[, 1], y = mcrds[, 2], border = border,  ... :
  Path drawing not available for this device
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:48:42+00:00Added an answer on June 15, 2026 at 12:48 pm

    Use plot(shape, usePolypath = FALSE) as described in this thread by Roger Bivand.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.