Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • issues with cuts option in geoplot command

    Hi,

    I am a doctoral student currently working on maps in stata and I have faced some issues with cuts option in geoplot that Ben Jann has recently introduced.

    The code that I built is as follows

    geoplot (area worldmap exvalue, color(plasma) cuts(1(9999)10000 10001(19999)30000 30001(14999)45000 45001(14999)60000 60001(14999)75000 75001(14999)90000 90001(14999)105000 @max)) , tight legend(position(sw))

    and I got an error message as

    cuts() invalid -- invalid numlist
    (error in layer 1: area ...)

    I had no problem until I put @max but I would like to have the top interval in the legend that indicates greater than 105001 without max value.

    The command is relatively new so my search for materials has not been much productive. If anybody is aware of ways to fix the issues, please kindly reply to the post.

    Thank you in advance for your kind help!

    Best,
    Last edited by Jungman Choi; 04 Dec 2023, 21:00.

  • #2
    @max is not allowed in cuts(). You must specify a numlist as described in help numlist. You could so something like this:

    Code:
    frame worldmap: sum exvalue, meanonly
    geoplot (area worldmap exvalue, cuts(0(10000)`r(max)')
    ben

    Comment


    • #3
      Thank you so much Ben Jann !! I made nice graphs using the code. Unfortunately, I am encountering another issue when beginning to use Macbook. I have posted another question as below, would you please give me any comment on the error?

      https://www.statalist.org/forums/for...ac#post1763957

      Many thanks to your kind comment, very much appreciated!

      Comment

      Working...
      X