Previous: Graphics and the Cursor - Basic Concepts Next: Graphics and the Cursor - Generating Graphics Table of contents Index Glossary Images Frames ITC-NGIC McIDAS-X Training Workshop > Graphics and the Cursor

6.1 Graphics and the Cursor - Defining Graphics Parameters
In this exercise, you will use the GU (Graphics Utility) command to list the colors currently assigned to the graphics color levels, change the color assigned to a level, create new colors, save the color assignments to a graphics table, and restore a graphics table.

  1. Start a McIDAS session.

    At the Unix prompt:

    Type: mcidas

    Your session should still be set for six frames from the last time you edited your .mcidasrc file. If not, set it for six frames, as described in Getting Started.

  2. Log on and initialize the workstation.

    Type: LOGON   initials   project#   I

  3. List the colors assigned to the graphics levels in the default graphics table.

    Type: GU TABLE

    GU TABLE                                                                        
     LEVEL   COLOR         BLUE  GREEN  RED                                         
     -----  ----------     ----  -----  ---                                         
        0   BLACK             0      0    0   (Graphic background)                  
        1   MAGENTA         255      0  255                                         
        2   CYAN            255    255    0                                         
        3   YELLOW            0    255  255                                         
        4   GREEN             0    255    0                                         
        5   RED               0      0  255                                         
        6   BLUE            255      0    0                                         
        7   WHITE           255    255  255                                         
        8   GRAY            127    127  127                                         
        9   GOLD              0    187  255                                         
       10   PINK            127    127  255                                         
       11   AQUAMARINE      147    219  112                                         
       12   ORCHID          219    112  219                                         
       13   NAVY            115      0    0                                         
       14   SKY             255    163    0                                         
       15   BEIGE           127    171  255                                         
       16   PURPLE          128      0  129                                         
    

  4. Generate a map of the United States with latitude and longitude lines on frame 1; then, generate a map of the Midwest with latitude and longitude lines on frame 2. The next exercise discusses generating graphics in more detail.

    Type: MAP USA 1 LALO 5 GRA=1;MAP MID 1 LALO 5 GRA=2

  5. List the predefined colors on your workstation.

    Type: GU COLORS

    GU COLORS
       Colors                                                               
    ------------                                                            
    AQUAMARINE     BLACK          BLUE           NAVY           CORAL       
    CYAN           FIREBRICK      BROWN          GOLD           GOLDENROD   
    GREEN          GRAY           GREY           KHAKI          MAGENTA     
    MAROON         ORANGE         ORCHID         PINK           PLUM        
    RED            SALMON         SIENNA         TAN            THISTLE     
    TURQUOISE      VIOLET         WHEAT          WHITE          YELLOW      
    BEIGE          LEMON          PURPLE         SKY            AVOCADO     
    

  6. Assign the color avocado to graphics color level 1, thistle to graphics color level 2, and goldenrod to graphics color level 5.

    Type: GU MAKE 1 AVOCADO;GU MAKE 2 THISTLE;GU MAKE 5 GOLDENROD

    Notice the graphics colors displayed in frame 1 changed when you assigned the new colors.

  7. Show frame 2.

    Type: SF 2

    Notice that the colors on frame 2 did not change. Each frame has its own graphics table; graphics color level changes affect only that frame. However, if you specify a range of frames or a different frame than the current frame, the changes affect the graphics tables for those frames.

  8. Show frame 1 and list the colors in the graphics table.

    Type: SF 1;GU TAB

    Notice that color levels 1, 2, and 5 have changed.

  9. Create a new color by specifying the blue, green, and red intensities. Assign the new color to graphics color level 1.

    Type: GU MAKE 1 35 107 200

  10. List the graphics table to verify that graphics color level 1 has new intensities.

    Type: GU TABLE

    Since you defined the color intensities, the name is blank in the table.

  11. Save the graphics table to a file called NEW and list the graphics tables on your workstation to verify that it was saved.

    Type: GU SAVE NEW;GU LIST

    Notice that the graphics tables have a default extention of .GRX

  12. Restore the graphics table named GRAPHIC, which contains the default graphics color levels.

    Type: GU REST GRAPHIC

  13. Restore the graphics table NEW to frames 1 and 2.

    Type: GU REST NEW 1 2

  14. Verify that both frames have the new graphics table restored.

    Press: Alt A
    Press: Alt B

  15. Restore the default graphics table, and erase the graphics frames. Use the GD command to change the current line width to 3 pixels.

    Type: GU REST GRAPHIC 1 2;ERASE G 1 4;GD 3

  16. Display first GOES-7 4km Visible image on frame 1 centered on Raleigh-Durham, North Carolina, decrease the resolution by a factor of 2, and draw a map on the satellite image. Because of the above GD command, the line thickness level is now 3. The graphics lines will appear thicker, making the map easier to see.

    Load the most recent BLIZZARD dataset GOES VIS image on Raleigh-Durham, NC:

    Type: IMGDISP GV4.1 1 STATION=KRDU MAG=-2;MAP H

  17. Change the line width back to the default, 1 pixel, and erase the graphics in frame 1.

    Type: GD 1
    Type: ERASE G 1

 


Previous: Graphics and the Cursor - Basic Concepts Next: Graphics and the Cursor - Generating Graphics Table of contents Index Glossary Images Frames ITC-NGIC McIDAS-X Training Workshop > Graphics and the Cursor