DS4PS / cpp-529-fall-2020

http://ds4ps.org/cpp-529-fall-2020/
0 stars 0 forks source link

Using locator() function #8

Open ekmcintyre opened 4 years ago

ekmcintyre commented 4 years ago

How do I use the locator() function to redefine the bounding box and zoom in on the subject on my plot? There are instructions to do this during Lab 04 under Step 4: Transform the Shapefile into A Dorling Cartogram.

lecy commented 4 years ago

Are you using a PC or a Mac?

JasonSills commented 4 years ago

Hi, @lecy
I'm having some challenges as well. I'm on a PC. Where do I place locator() in the code chunk and how do I use it?

ekmcintyre commented 4 years ago

PC

lecy commented 4 years ago

bounding-box-gif

lecy commented 4 years ago

You can NOT place locator() into an RMD file because it is an interactive function.

You can use it to quickly determine the coordinates for the bounding box, though.

Otherwise you can use:

axis( side=1 )
axis( side=2 )
par( "usr" )

And based upon values make some judicious guesses.

JasonSills commented 4 years ago

Got it, thanks for the help. I was trying it in RMD.