More tinkering around here revealed something interesting:
 
I was eventually able to redefine index color 0 (used by default as the 
'background canvas' of the plot) to be 'white', and able to redefine index 
color 1 (used by default as the 'pen' of the plot).  
 
But note that I had to use 'fully qualified object name' format to access 
'pgscr' properly!
 
#select render device and set scale widths
dev("pgplot.png/PNG");
env(0,23,0,100);
#define colors AFTER selecting the device!
PDL::Graphics::PGPLOT::pgscr(0,1,1,1); #set background canvas to white
PDL::Graphics::PGPLOT::pgscr(1,0,0,0);  #set foreground        to black
 
if i did not explicitly preceed the object name with the package name, Perl 
could not 'see' the 'pgscr' object.
when i tried it this way...
 
#select render device and set scale widths
dev("pgplot.png/PNG");
env(0,23,0,100);
#define colors AFTER selecting the device!
pgscr(0,1,1,1); #set background canvas to white
pgscr(1,0,0,0);  #set foreground        to black

Perl complained that it didnt know what 'pgscr' was, and croaked with 
'undefined object &main::pgscr
 
I am not sure why some of the PGPLOT objects can be directly called by their 
'short name' in my program, vs why this object name required the full qualified 
name...  I am a bit confused by this...
 
Greg
                                          
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to