BookmarkSubscribeRSS Feed
VictoriaLynne
Calcite | Level 5

Recently my client has upgraded to WPS version 5.25 previously on version 4.

This upgrade has resulted in my graph text: title legend text axis labels...etc being blank or not saved in, I assume they are being saved due to the gapping between the legend colours.  

VictoriaLynne_0-1776382929254.gif


GOPTIONS DEVICE=GIF  GSFNAME=GIFOUT  GSFMODE=REPLACE CTITLE=BLACK   
         COLORS=(CXC0504D,CX8064A2,CX4F81BD,CX4BACC6,CX9BBB59)      
         CTEXT=BLACK;                                               
AXIS1  LABEL = ("test label")                                                                                      
LEGEND1 LABEL=("TEST LABEL")                                        
        SHAPE=BAR(10pt,10pt)                                                                                                                               
PROC GPLOT DATA=MEAN_PRISM ;                                        
TITLE1 "test title";                                                                
    ** graphing data here***                                                      
     FRAME                                                          
     LEGEND=LEGEND1                                                 
     HAXIS=AXIS1;                                                   
RUN ;                                                               

Please Note: i have removed the graphing portions of the code for confidentiality, the graphing itself works it's just the title and labels texts I'm having an issue with.
I have attempted:
specifying the text colours to be black in various ways: setting them in the labels, gooptions..etc
using the options label proc to check for labelling rules - we can use labels 
changing to sgplot - same issues and i prefer gplot 

Would anyone have any suggestions of what i could try to fix this?


2 REPLIES 2
ballardw
Super User

I would suggest using one of the SAS supplied data sets such as SASHELP.CLASS or SASHELP.CARS with Proc Gplot using similar options that demonstrates the same behavior.  Then show us the complete code from that example. 

That way things like the incomplete AXIS1 and LEGEND1 definitions, missing a semicolons, would be addressed and removed as possible sources of a problem.

Also it very often more useful to see the LOG with the notes and any warnings or errors involved with the code.

For example, with your current code shown with the Axis and Legend statements incomplete then possibly the current code did not replace a previous file because Proc Gplot would not actually run with the shown code. The LOG would clear that up. Copy the text from the log, on the forum open a text box using the </> icon above the message window and paste the copied text. The text box preserved formatting that would be removed in the main message window.

Here is an example LOG based on your posted code modified to use a set that exists on my system and a plot statement. Note the syntax errors thrown by the incomplete statements.

21   AXIS1  LABEL = ("test label")
22   LEGEND1 LABEL=("TEST LABEL")
     -------
     22
     202
23           SHAPE=BAR(10pt,10pt)
             -----
             22
             76
ERROR 22-322: Syntax error, expecting one of the following: ;, ',', COLOR,
              INTERVAL, LABEL, LENGTH, LOGBASE, LOGSTYLE, MAJOR, MINOR,
              NOBRACKETS, NOPLANE, NOSTAGGER, OFFSET, ORDER, ORIGIN, REF,
              REFLABEL, SPLIT, STAGGER, STYLE, VALUE, WIDTH.
ERROR 202-322: The option or parameter is not recognized and will be
               ignored.
ERROR 76-322: Syntax error, statement will be ignored.
24   PROC GPLOT DATA=sashelp.class ;
25   TITLE1 "test title";
26        plot height*weight
          ----
          180
ERROR 180-322: Statement is not valid or it is used out of proper order.
27        FRAME
28        LEGEND=LEGEND1
29        HAXIS=AXIS1;

30   RUN ;
31   quit;

 

Is the image you show as created by SAS or after import into WPS? From your description it seems like you had a process working that changed when your client changed their software. Or did your data change making the graph appear different in the SAS created file?

 

 

 

You may also want to run Proc GDEVICE to get a listing of the current settings of your GIF device driver. It might be that something modified that driver.

Code using the default location of the SAS/Graph devices:

  Proc gdevice nofs catalog= sashelp.devices ;
    list gif;
   run;

and likely result:

GDEVICE procedure                                                          
Listing from SASHELP.DEVICES - Entry GIF                                   
                                                                           
  Orig Driver: GIF                Module:   SASGDDMX  Model:    19999      
  Description: GIF Universal Printer                       Type: PRINTER   
  *** Institute-supplied ***                                               
  Lrows:  43  Xmax:   8.333 IN    Hsize:    0.000 IN  Xpixels:        800  
  Lcols:  88  Ymax:   6.250 IN    Vsize:    0.000 IN  Ypixels:        600  
  Prows:   0                      Horigin:  0.000 IN                       
  Pcols:   0                      Vorigin:  0.000 IN                       
  Aspect:   0.000                 Rotate:                                  
  Driver query: Y                 Queued messages: N                       
                                  Paperfeed:   0.000 IN                    
                                                                           
                                                                           
  OPTIONS                                                                  
                                                                           
  Erase:                   Autofeed:                Chartype:    0         
  Swap:                    Cell:                    Maxcolors:17E6         
  Autocopy:                Characters:              Repaint:     0         
  Handshake:               Circlearc:               Gcopies:     0         
                           Dash:                    Gsize:       0         
  Prompt - startup:        Fill:                    Speed:       0         
         end graph:        Piefill:                 Fillinc:     0         
         mount pen:        Polyfill:                Maxpoly:  3000         
         chg paper:        Symbol:                  Lfactor:     0         
                           Pensort:       N                                
  Promptchars:  '000A010D05000000'X                                        
  Rectfill:     '8000800000000000'X                                        
  Dashline:     'FFFFFFFFFFFC0000'X                                        
  Devopts:      'DDC3A0C809E823C8'X                                        
  UCC:      '0021010A000004010A0000040000000000010001'X                    
                                                                           
  Cback:      WHITE                                                        
  Color list:                                                              
                                                                           
    BLACK          RED            GREEN          BLUE           CYAN       
    MAGENTA        GRAY           PINK           ORANGE         BROWN      
    YELLOW         BISQUE         CORAL          LIME           MAROON     
    DARKGRAY       DEEPPINK       DIMGRAY        NAVY           OLIVE      
    PERU           PLUM           GOLD           THISTLE        HOTPINK    
    INDIGO         KHAKI          LAVENDER       PURPLE         SIENNA     
    SILVER         SKYBLUE        TAN            TEAL           TOMATO     
    VIOLET         WHEAT                                                   
                                                                           
  CHARTYPE RECORDS                                                         
                                                                           
  Chartype Rows  Cols                  Font Name                 Scalable  
       0      1     1   <MTmonospace>                                Y     
                                                                           
  FILE INFORMATION                                                         
                                                                           
  Gaccess:                                                                 
  Gsfname:                        Gsfmode:  REPLACE   Gsflen:       0      
  Trantab:                        Devmap:                                  
  Devtype:    GTERM                                                        
  Gprotocol:                                                               
  Fileclose:  DRIVERTERM                                                   
  Hostspec:                                                                
                                                                           
  HOST INFORMATION                                                         
                                                                           

 

It has been a long time since I played with the Graph devices but this may provide some help.

 

GraphGuy
Meteorite | Level 14

The goptions ctitle and ctext "should" be controlling your title and text, but I'm suspecting it is somehow coming out white on a white background instead.

 

Perhaps try specifying the color on the title statement itself, and see if that makes a difference, such as ...

 

TITLE1 color=red "test title";

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 407 views
  • 1 like
  • 3 in conversation