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

  • SEARCH
  • Home
  • 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 8655373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:00:46+00:00 2026-06-12T15:00:46+00:00

I am trying to produce Choroplete maps using shapefiles and Data provided by Eurostat.

  • 0

I am trying to produce Choroplete maps using shapefiles and Data provided by Eurostat. The shapefile has been downloaded here: using JD Longs code from this post.

This is the minimal code to reproduce the figure I posted below.

library(maptools)
tmpdir <- tempdir()
url <- 'http://ec.europa.eu/eurostat/cache/GISCO/geodatafiles/NUTS_2010_03M_SH.zip'
file <- basename(url)
download.file(url, file)
unzip(file, exdir = tmpdir )
shapeFile <- paste(tmpdir,"/Shape/data/NUTS_RG_03M_2010", sep="")

EU <- readShapeSpatial(shapeFile)
plot(EU)

My problem is that I would like to have the plot area to focus on Europe only, but due to the Overseas regions (France and Spain), the plot does not have the right focus. Is there an easy way to “crop” the plot area in the above example?

The polygons I want to get rid of are are part of the “Country_Shape”, so filtering them out is no option.
I tried to achieve my goal by defining the xlim and ylim parameters in the plot command, but did not succeed. I used locator() to get the coordinates from the graphics device, but plugging the values in didn’t provide the wanted results.

The minimal example

  • 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-12T15:00:47+00:00Added an answer on June 12, 2026 at 3:00 pm

    The shapefile projection file (Shape/data/NUTS_RG_03M_2010.prj) shows the following:

    GEOGCS[“GCS_ETRS_1989”,DATUM[“D_ETRS_1989”,SPHEROID[“GRS_1980”,6378137.0,298.257222101]],PRIMEM[“Greenwich”,0.0],UNIT[“Degree”,0.0174532925199433]]

    The information contained in the .prj file specifies the geographic coordinate system of the geometric data in the Shapefile. Try appropriate coordinates for xlim and ylim for this coordinate system:

    R> plot(EU, ylim=c(30, 70), xlim=c(-10, 44))
    R> box()
    

    plot example

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

Sidebar

Related Questions

I'm trying to produce a plot with two lines using data taken from stdin.
I am trying to produce a scatter plot that has two different y-axes and
Using CakePHP 1.2, I am trying produce a GROUP BY query: SELECT `categories`.*, COUNT(`entities`.id)
I'm trying to produce a counter application for android. It has 5 TextViews for
I've been trying to produce a query that will search table1, and then CONCAT
I am trying to produce an interactive Haskell program using the interact function with
I have been trying to produce a statically linked single binary version of my
I'm trying to produce some graphs using GNUplot with a makefile. I would like
I'm trying to produce a string using a NSDate category in this way: NSString*
I´m trying to produce a worldmap using ggplot2 in R. It schould be a

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.