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 7540031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:32:16+00:00 2026-05-30T07:32:16+00:00

on a world map, how do I plot a single point? all_states <- map_data(usa)

  • 0

on a world map, how do I plot a single point?

all_states <- map_data("usa")
p <- p + geom_polygon( data=all_states, aes(x=long, y=lat, group = group, legend = FALSE))
p

Also, is it possible to remove the grid and the lat long values form the map?

  • 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-05-30T07:32:18+00:00Added an answer on May 30, 2026 at 7:32 am
    library(maps)
    library(ggplot2)
    world<-map_data('world')
    sf<-data.frame(long=-122.26,lat=37.47)
    p <- ggplot(legend=FALSE) +
    geom_polygon( data=world, aes(x=long, y=lat,group=group)) +
    opts(panel.background = theme_blank()) +
    opts(panel.grid.major = theme_blank()) +
    opts(panel.grid.minor = theme_blank()) +
    opts(axis.text.x = theme_blank(),axis.text.y = theme_blank()) +
    opts(axis.ticks = theme_blank()) +
    xlab("") + ylab("")
    # add a single point
    
    p <- p + geom_point(data=sf,aes(long,lat),colour="green",size=4)
    p
    

    Note: Since version 0.9.2 opts has been replaced by theme. So for example, opts(panel.background = theme_blank()) would become theme(panel.background = element_blank()).

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

Sidebar

Related Questions

I need to plot discrete X,Y data as a MAP in a PNG or
I have a 2d array (lat*long) containing height information. I want to map this
How can I improve the legend of spatial raster map plot using ggplot when
I'm looking for some suggestions as to how I could implement a World Map
Yep, I'm a SQL jockey (sorta) coming into the CouchDb Map/Reduce world. I thought
I have an SVG map of the world, and I want to colour each
I need a 2d political map of the world on which I will draw
how do I plot an area around a set of points on a map
I'm looking for a javascript world map, much like Google Maps, that can be
I have two figures, one is a data plot resulting from some calculations and

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.