X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 27 Dec 2023 12:31 PM by  Ben Castellani
Disappearing latitude labels in MAP
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Jeremy Drake



New Member


Posts:
New Member


--
22 Nov 2023 10:25 PM
    Is this a bug, or I am failing to use MAP correctly somehow? In the three examples below, for me the last one has no latitude labels when specifying the 'Geographic' projection. This does not happen with other projections.

    limits=[20.,-130.,55.,-60.] ; lat and long limits
    marg=[0.15,0.15,0.1,0.1] ; margins in normalised units

    Map = MAP('Geographic', LIMIT=limits, FILL_COLOR="steel blue", LINESTYLE='dotted', $
    LABEL_POSITION=0, FONT_SIZE=12, MARGIN=marg, ASPECT_RATIO=1.0)
    m2 = MAPCONTINENTS(/countries, FILL_COLOR="tan")

    limits=[20.,-130.,55.,-100.]
    Map = MAP('Geographic', LIMIT=limits, FILL_COLOR="steel blue", LINESTYLE='dotted', $
    LABEL_POSITION=0, FONT_SIZE=12, MARGIN=marg, ASPECT_RATIO=1.0)
    m2 = MAPCONTINENTS(/countries, FILL_COLOR="tan")

    limits=[30.,-118.,35.,-110.]
    Map = MAP('Geographic', LIMIT=limits, FILL_COLOR="steel blue", LINESTYLE='dotted', $
    LABEL_POSITION=0, FONT_SIZE=12, MARGIN=marg, ASPECT_RATIO=1.0)
    m2 = MAPCONTINENTS(/countries, FILL_COLOR="tan")


    Sangwoo Lee



    New Member


    Posts:7
    New Member


    --
    13 Dec 2023 11:17 PM
    I'm not sure if it's bug or not. But a possible walkaround could be adding CLIP property to MAP function and setting it to be zero. It worked for me.

    m = MAP(~~~~~~~, CLIP=0)

    Ben Castellani



    Basic Member


    Posts:130
    Basic Member


    --
    27 Dec 2023 12:31 PM
    The way IDL handles clipping with MAP's various projections can sometimes behave wonky depending on what you are doing --- not necessarily a bug per se. To get the desired result, sometimes you either will need to force clipping or disable it. In your problematic third MAP call, you need to disable clipping:

    limits=[30.,-118.,35.,-110.]
    Map = MAP('Geographic', LIMIT=limits, FILL_COLOR="steel blue", LINESTYLE='dotted', $
    LABEL_POSITION=0, FONT_SIZE=12, MARGIN=marg, ASPECT_RATIO=1.0, CLIP=0)
    m2 = MAPCONTINENTS(/countries, FILL_COLOR="tan")
    You are not authorized to post a reply.