From: Werner S. <sm...@ia...> - 2007-02-20 09:39:48
|
Hi, I think plcol0(0) doesn't "work", since you plot white on white (color 0, which is the background, was set to white by plscolbg()). I normally do (this is C code; this must be done before the init() call!): /* exchange black and white - background is white */ plscol0( 0, 255, 255, 255 ); /* White, color 0, background */ plscol0( 15, 0, 0, 0 ); /* Black, color 15 */ /* Initialize plplot */ plinit(); ans use color 15 if I want something in black: plcol0( 15 ); pllab( "Energy [eV]", "Polar angle [deg]", "Transmission function" ); There is no need to call plscolbg() than anymore (in fact this function calls plcol(0)) HTH, Werner Kåre Edvardsen wrote: > > How do I get a black plot on a white background. I can get about any > color on a with background, except black. 'plcol0 (0)' does not work. Why??? > > I'm using plplot (5.6.1) and perlDL. Here's my sampl code: > > use PDL; > use PDL::Graphics::PLplot; > > $x = sequence 6; > $y = $x ** 2; > > plsdev ("xwin"); > plscolbg (255,255,255); # Gives white bg > plinit (); > > pladv (0); > plvpor (0.15,0.85,0.1, 0.9); > plwind (0.0,5.0,0.0,26.0); > > plbox (0,0,0,0,"bcnst","bcnst"); > plcol0 (0); # Does NOT give black, just gives nothing... > plline ($x, $y); > > plend (); > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Plplot-general mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-general -- Dipl. Ing. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: sm...@ia... web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 |