Message Boards Message Boards

GeoListPlot: exact placement of label

Posted 9 years ago

Re Mathematica 10.3 under Windows 8.

I use GeoListPlot to show Italy. To mark Rome, I use Labeled[..., Style["Rome",12,Blue]] -- this puts the label "Rome" to the upper-right of the marker.

How do I reposition the label to the lower-left and in general, how do I specify the relative placement about the marker?

Finally, Italy displays with Sardinia and Sicily shown. How do I suppress these?

Thanks.

POSTED BY: Bruce Colletti
7 Replies
Posted 9 years ago

Perfect. That's exactly what I sought. Others will undoubtedly find it valuable, too. Thanks again, Gianluca.

Bruce

POSTED BY: Bruce Colletti

More precisely:

itcont = Entity["Country", "Italy"]["Polygon"];
GeoGraphics[Line[GeoPosition[itcont[[1, 1, 1]]]], 
 GeoBackground -> None]
POSTED BY: Gianluca Gorni

I don't know if there is a built-in function for that purpose. One workaround is to extract the contours of Italy with Entity["Country", "Italy"]["Polygon"], delete the island parts of it, and then display the result with Geobackground->None. The look of the map is quite different, but it may work for you.

POSTED BY: Gianluca Gorni
Posted 9 years ago

Thank you, Gianluca. That works!

Is there a way to suppress the display of Sardinia and Sicily? It's easy enough to cut these out in a graphics editor but I'm hoping there's a Mathematica function or option that does so.

Bruce

POSTED BY: Bruce Colletti

You may consider switching to GeoGraphics:

romePosition = 
  Entity["City", {"Rome", "Lazio", "Italy"}]["Coordinates"];
GeoGraphics[{Entity["Country", "Italy"], PointSize[Large], 
  Point[romePosition], Text["Rome", romePosition, {1, -1}]}]

enter image description here

POSTED BY: Gianluca Gorni
Posted 9 years ago

Sam

The code and graphic follows (I didn't want to post since it's large). I actually typed:

GeoListPlot[{
    Entity["Country", "Italy"], 
    Labeled[Entity["City", {"Rome", "Lazio", "Italy"}], Style["Rome", 14, Blue]]}, 
  GeoBackground -> None]

enter image description here

Thanks for asking.

POSTED BY: Bruce Colletti

Hi Bruce, if you could post your complete code an image of output, it'd be great, this site is completely equipped for that. It would save us time from interpreting and help to answer the question. Thanks!

POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract