pgplot ø¹Ï°Æµ{¦¡®w
¦w¸Ë º[ «Øºc pgplot ªº¤èªk
¨ú±o®M¥ó
¨ú±o®M¥ó¡]¦b¦¹¥H pgplot 5.2 ª©¬°¨Ò¡^¡A±Ð«Ç¾÷¾¹¥Ø¿ý /NFS_home/pgplot/ ¤U¤]¦³©ñ¡A¦WºÙ¬O pgplot5.2.tar.gz ¡]¥t¥~ /NFS_home/pgplot/pgplot «h¬O pgplot ¥D¥Ø¿ý¡^¡Ccopy ¨ì¦Û¤wªº¥Ø¿ý¤U¡]¦p /NFS_home/u12345678¡^
PGPLOT ªº©x¤èºô¯¸¡Ghttp://www.astro.caltech.edu/~tjp/pgplot/
¥»¦a¡]²H¦¿¤j¾Ç¡^³sµ²ÂI pgplot5.2.tar.gz
·Ç³Æ¥Ø¿ý
¿ï¾Ü¤@ӼȮɩñ¸mì©l½X¥]ªº¥Ø¿ý¡]¥´ mkdir /NFS_home/u12345678/pgplot_source¡^¡A¨Ã§ó§ï¥Ø«e©Ò¦b¥Ø¿ý¦ì¸m¨ì³oӼȮɥؿý¡]¥´ cd /NFS_home/u12345678/pgplot_source¡^¡A¥´¤U¦C«ü¥O¸Ñ¶} ¡]tar -zxf /NFS_home/u12345678/pgplot5.2.tar.gz¡^¡A¦p¦¹·|¦b /NFS_home/u12345678/pgplot_source ¥Ø¿ý¤U¦A¦h²£¥Í¤@Ó pgplot ¥Ø¿ý¡A¤º¦³§¹«¬¾ãªºì©l½X®M¥ó¡C°ò¥»¤W¥ýn¬ÝªºÅª§ÚÀɮ׬O aaaread.me¡A¦w¸Ë¨BÆJ«h¼g¦b install-unix.txt ¡C
½s¿è drivers.list ²M³æ
pgplot ¤ä´©¤£¦Pªºµe±Åã¥Ü¤ÎÀɮ׿é¥X¤è¦¡¥i¨Ñ¿ï¾Ü¡A³o¬O³z¹L½s¿è drivers.list ²M³æ¨Ó¥´¶}©ÎÃö±¼ªº¡C¤£¦P§@·~¨t²ÎÀô¹Ò¤§¤ä´©«×¨Ã¤£¬Û¦P¡A³Ì¦n¿ïè¦n°÷¥Îªº´N¦n¤F¡A¥HÁקK¿ï¨ì¬Y¨Ç¤£¤ä´©ªº driver¡A´Nn¦^¥h¶}Ãö±¼¦A«°µ¡]©Ò¦³¿ï¾Üªº drivers ³£¦³¤ä´©¨ì¡A«Øºc pgplot Àô¹Òªº°Ê§@¤~·|¶i¦æ¤U¥h¡^¡C¤j®a¥i¥Î¦b vi ½s¿è drivers.list¡A«e±¦³ "!" §½²Å¸¹ªº´N¥Nªí¸Ó¶µÃö³¬¡A§â "!" ¸¹§R°£´N¥Nªí¸Ó¶µ¥´¶}¡C§Ṳ́@¯ë¦Ü¤Ö·|¿ï /NULL¡B/XWINDOW ¥H¤Î /XSERV¡C¦pªGµy«á¤U make «ü¥O¤§«á¦³¤£¯à§¹¦¨¦Ó¦³¿ù»~ªº¸Ü¡A¥i¸ÕµÛ§â¿ù»~°T®§¤¤´£¨ì¤§¦³Ãö«Yªº device Ãö±¼¦A«°µ¡A¨Ò¦p¦³¨Ç¨t²Î¤£¤ä·½ /XDISP¡C
²£¥Í makefile ÀÉ
½s¿è§¹¤F drivers.list ²M³æ¤§«á¡A§ÚÌn¿ï¾Ü¨Ã«Ø¥ß±N¨Ó pgplot ®M¥ó¦b¨t²Î¤¤¦s©ñªº¥Ø¿ý¡A¦pªG§A¦³ºÞ²zªÌÅv¡A«h©ñ¦b¤½¦@¥Ø¿ý¤j®a¥Î°_¨Ó·|¤ñ¸û¤è«K¡]¦p /usr/local/pgplot ¡^¡FY§A¨S¦³ºÞ²zªÌÅv¡A«h¦b¨Ï¥ÎªÌ¦Û¤v¥ô¦óªº¥Ø¿ý¤U³£¨S¦³Ãö«Y¡C¤ñ¤è»¡¡A§A¨M©w§¹¦¨«áªº pgplot ¥Ø¿ýn©ñ¦b /NFS_home/u12345678/pgplot¡A«h¥ý¦b§Aªº $HOME ¥Ø¿ý¦ì¸m¤U«Ø¥ß pgplot ¥Ø¿ý¡]¥´ mkdir /NFS_home/u12345678/pgplot¡^¡AµM«á cd ¨ì¨ºÓ¥Ø¿ýùØ¡]¥´ cd /NFS_home/u12345678/pgplot¡^¡AµM«á¦b¸Ó¥Ø¿ý¤U¥´
/NFS_home/u12345678/pgplot_source/pgplot/makemake /NFS_home/u12345678/pgplot_source/pgplot linux
¤Wzªø«ü¥O¦³¤TÓ³¡¤À¡A²Ä¤@Ó¬O«ü¥O makemake ªº¦ì¸m¡]makemake ¬O pgplot §@ªÌ¼gªº¤@Ó script¡A¥¦¨Ã¤£¬O¤@Ó UNIX «ü¥O¡^¡A¥¦«e±ªº¤@ªø¦ê¸ô®|¬O·íªìì©l½X®M¥ó¥]¸Ñ¶}ªº¼È©ñ¦ì¸m¡A²Ä¤G³¡¤À¬Oì©l½X¥Ø¿ý¸ô®|¡A²Ä¤TÓ³¡¤À¬O§@·~¨t²ÎÃþ§O¡A¦b¦¹µ¹ "linux"¡C¦pªG¦w¸Ëªº compiler ¤£¦P©Î¦h©ó¤@ºØ¦Ó¨Ï pgplot µLªk¦Û¦æ°»´ú§ä¨ì¥¦nªº©Î¬O§A¯S§O·Q«ü©wªº¡A«h¤Wzªø«ü¥O«á±¥i¦Aµ¹¤@ӰѼơA¸Ô²Ó»¡©ú½Ð¨£ install-unix.txt¡C
¥H¦³¦w¸Ë g77 ªº Fedora Linux ¬°¨Ò¡A¥i¿ï¾Ü :
/pg_src_dir/makemake /pg_src_dir linux g77_gcc_aout
¨ä¤¤ /pg_src_dir ¦b³oùØ¥Nªí¸Ñ¶}¤§ pgplot ì©l½X®M¥ó¥]©Ò¦bªº¦ì¸m¡C
¥H¦³¦w¸Ë gfortran ªº cygwin ¬°¨Ò¡A¥i¿ï¾Ü :
/home/u01/pg_src_dir/makemake /home/u01/pg_src_dir cygwin gfortran_gcc
¨ä¤¤ /home/u01/pg_src_dir ¦b³oùØ¥Nªí¸Ñ¶}¤§ pgplot ì©l½X®M¥ó¥]©Ò¦bªº¦ì¸m¡C
¤U make «ü¥O
¦pªG¤Wz "makemake ¸ô®| §@·~¨t²Î [½sĶ¾¹¿ï¶µ] " ¦³¦¨¥\¡A«h§A¦b¥Ø«e¥Ø¿ý¡]pgplot ¦w¸Ë¥Ø¿ý¡^¤U·|¬Ý¨ì¥H¤UÀÉ®×
drivers.list
grexec.f
prpckgl.inc
makefile
pgplot.inc
rgb.txt¦A¨Ó¡A§A´N¥i¥H¦b¥Ø«e¥Ø¿ý¤U¥´ make ¡]make ¬O¤@Ó«nªº UNIX «ü¥O¡A¦³¿³½ì¦P¾Ç½Ð¥´ man make ©Î°Ñ¦Ò½u¤W UNIX Ãã¨å¡^ ¡C¥¦·|®Ú¾Ú¥Ø¿ý¤Uªº makefile ¤@¨B¨B½sĶ©Ò¦³ pgplot ´£¨Ñªº°Æµ{¦¡¡A²£¥Íª«¥óÀÉ (*.o) ¨Ã¥[¥H²Õ¸Ë¦¨µ{¦¡®wÀÉ (library file) ªº®æ¦¡¡A§ÚÌ¥Dn´N¬On¨ºÓ libpgplot.a ªº library ÀÉ¡C ¥t¥~¡A¥Ñ©ó§Ú̦³¿ï¾Ü /XWINDOW ©Î /XSERV¡A·|¦A¦h²£¥Í pgxwin_server ¥i°õ¦æÀÉ¡F¤S¦]¬°§Ṳ́]¿ï¤F/XDISP¡A ·|¦A¦h²£¥Í pgdisp ¥i°õ¦æÀÉ¡C
Note : For Ubuntu (a kind of Linux Distribution) user, there will be error message :
PGPLOT¿ù»~°T®§
.//pgdispd/proccom.c:166: ¿ù»~¡G »P ¡umalloc¡v Ãþ«¬½Ä¬ð
¸Ñ¨M¤èªk¡G ±N proccom.c ªº line 166 µù¸Ñ±¼
¶]½d¨Òµ{¦¡´ú¸Õ
³Ì«á¡A§Ú̶]½d¨Òµ{¦¡¨Ó´ú¸Õ¬O§_§¹¥þ¦¨¥\¡C¬°¤FÅýÅã¥Üµ{¦¡ª¾¹D pgplot ªº¦w¸Ë¥Ø¿ý¦b¨ºùØ¡A¤~¯àŪ±o¨ì©Ò»ÝªºÀɮסAº¥ýn½T©wÀô¹ÒÅܼƦ³§â PGPLOT_DIR ©w¸q¦n¡A³o»Ýn¦b csh/tcsh ¥´¤U¦C«ü¥O¡G
setenv PGPLOT_DIR /NFS_home/u12345678/pgplot
©Î sh/bash/ksh ¤U¥´¤U¦C«ü¥O¡G
set PGPLOT_DIR = /NFS_home/u12345678/pgplot ; export PGPLOT_DIR
µù¡G¦pªG§A¨S¦³³]¤Wzªº PGPLOT_DIR Àô¹ÒÅܼơA¥un§â pgxwin_server «þ¨©¨ì¨t²Î¤½¥Îªº¥i°õ¦æÀɥؿý ¦p /usr/bin ¤§¤U¡Aµ´¤j³¡¤Àªº¥\¯à¤]³£¯à¥¿±`°õ¦æ¡C
¶]½d¨Òµ{¦¡ªº¤èªk¡A¬O¥´¨äµ{¦¡ªº¦WºÙ¡A¦p ./pgdemo1¡]Y¤£¦b¥Ø«e¥Ø¿ý¤U«h»Ý¥]§t¾A·íªº¸ô®|¡^¡C
¦pªG§Aªº shell ©ê«è¥¦§ä¤£¨ì libpgplot.so¡A«h§A¥i¥H¥ý¥´ tcsh ¦A¥´
setenv LD_LIBRARY_PATH /NFS_home/u12345678/pgplot
µM«á¦A°õ¦æ ./pgdemo1
µù¡GY¥¼³]©w PGPLOT_DIR ³oÓÀô¹ÒÅܼơ]¤èªk¨£¤W¡^¡A¦³¥i¯à¾ÉP pgplot µLªkÅã¥Ü¤å¦r¡A¯S¦¹´£¿ô¡C
³]©w¨Ï¥ÎªÌµn¤Jªº¹w³]Àô¹ÒÈ
«Ü¦h½ÆÂøªºµ{¦¡¡A¥Ñ©ó»Ýn¨ä¯S©w¥Ø¿ý¤Uªº¨ä¥L¨ó¦P¤u¨ãµ{¦¡¤@°_¹B§@¡A©Î¬O»Ýn¨ä¯S©w¥Ø¿ý¤Uªº¬Y¨Ç¸ê®Æ¡A¬Æ¦Ü¬O³]©wÈ¡A¦]¦¹»Ýn¨t²ÎÂÇ¥ÑÀô¹ÒÅܼƨӧi¶D¥Dµ{¦¡³o¨Ç¯S©wªº¥Ø¿ý¦b¨ºùØ¡C³oºØ´À¯S©wµ{¦¡³]©wÀô¹ÒÅܼƪº°Ê§@¡A©TµM¥i¥H¥Ñ¨Ï¥ÎªÌª½±µ¤U«ü¥O©Î¬O¼g¤@Ó¦Û°Ê°õ¦æªº script ¨Ó¶i¦æ¡A¦ý³o¼Ë°µ¨Ï¥Î³£ªÌ³£¤´»Ý°O±o¥h¤U¤@өΤ@¨Ç«ü¥O¡C¦pªG¨C¦¸¶i¤J¨t²Î³£§Æ±æ¦³¨º¼ËªºÀô¹ÒÅܼƳ]©w¡A«h¥i¦¸¦b shell ªº .cshrc ¦¨ .profile¡]©Î .login¡^
.profile ¬O¨C¦¸µn¤J¨t²Î®Én°µªº°Ê§@¡A¦Ó .cshrc «h¬O¨C¦¸°_°Ê
¦pªG§A¥Îªº¬O bash¡A«h .bashrc »P .bash_profile ¬O¹ïµ¥©ó«eªÌªº¨âÓÀÉ¡C
.cshrc ¤Î .profile ½d¨Ò
http://phi.sinica.edu.tw/aspac/notes/94/N94002/
http://netlab.cse.yzu.edu.tw/~statue/freebsd/docs/aasir/ch18.pdf
http://ece.niu.edu.tw/~chu/download/doc/UNIX.txt
pgplot ¨Ï¥ÎªºÀô¹ÒÅܼƽd¨Ò
¥H S105 ¹q¸£±Ð«ÇªºÀô¹Ò¬°¨Ò¡]¨Ï¥Î csh / tcsh shell Àô¹Ò¡^¡G
set path = (/NFS_home/pgplot/pgplot $path)
setenv PGPLOT_DIR /NFS_home/pgplot/pgplot
setenv LD_LIBRARY_PATH /NFS_home/pgplot/pgplot
setenv PGPLOT_FONT /NFS_home/pgplot/pgplot/grfont.dat§A¥i¥H§â³oÓ script ¥s°µ set_pgplot.csh¡A¨C¦¸¨Ï¥Î pgplot «e¦b tcsh/csh ¤U¡]¹q¸£±Ð«Ç¨Ï¥ÎªÌ¹w³]ªº shell¡^¥´ source set_pgplot.csh §Y¥i¡C
¦Ü©ó¦b¦Ò¸Õ¥Îªº VMware Àô¹Ò¡A°£¤F«ez¼Ð·Ç¤èªk¡]¨ä¤¤ -L /usr/local/pgplot -lpgplot ½Ð©ñ¦b¾ã¦æªº³Ì«á±¡A¦b§Ú̲{¦bªº¨t²Î¤¤¤ñ¸û®e©ö§ä±o¨ì¡^¡G
gfortran -o my_prog.x my_prog.f -L /usr/X11R6/lib -lX11 -L /usr/local/pgplot -lpgplot
¤§¥~¡A¤]¥i¥Î¥H¤U§@ªk¡G¥ý§â libpgplot.a ±q /usr/local/pgplot ©Î ~/examples ¥Ø¿ý copy ¨ì¥Ø«e¤u§@ªº¥Ø¿ý¨Ó¡A¦b½sĶÁåµ²®É«h§ï¤U¡]¥H¤Un¥´¦b¦P¤@¦æ¡^
gfortran -o my_prog.x -L /usr/X11R6/lib -lX11 my_prog.f libpgplot.a
¦p¦ó¥Î¼¶¼g¤Î½sĶ¥i§Q¥Î pgplot ø¹Ïªº Fortran µ{¦¡
¼¶¼g
¾Ç²ß¦p¦ó¨Ï¥Î pgplot ³Ì¦nªº¤èªk¡A¬O¡G
(1) ½sĶ¨Ã°õ¦æ¨ä¤ºªþªº¤@¨t¦C½d¨Òµ{¦¡ pgdemo1.f ~ pgdemo17.f¡]¦b¥»½Òµ{µ¹¤j®aªºµêÀÀ¾÷¾¹¬O©ñ¸m¦b /usr/local/pgplot ¤U¡F¦b±Ð«Çªº¾÷¾¹¬O©ñ¸m¦b /NFS_home/pgplot/pgplot/examples ¤º¡A¦Û¦æ¦w¸ËªÌ½Ð¨ì pgplot ¥D¥Ø¿ý¤Uªº examples ¥Ø¿ý§ä¡^¡]«Ø¥ß§¹ pgplot Àô¹Ò¤Î°Æµ{¦¡®w«á·|¦Û°Ê²£¥Í pgdemo1 ~ pgdemo17 ¥i°õ¦æÀÉ¡A¦]¦¹¤]¥i¥H¥h copy ¹L¨Ó¦Ó¤£¥²¦Û¦æ½sĶ¡^¡AÆ[¬Ý¨ä¥\¯à®i¥Ü¡C¦A
(2) ¨ì¬ÛÃöµ{¦¡¤Î°Æµ{¦¡¤¤°Ñ¦Ò¨ä«ü¥O¡]ø¹Ï°Æµ{¦¡¡^¦WºÙ¤Î¨ä¨Ï¥Îªº¤è¦¡¡A¨Ã¦P®É
(3) ±q½u¤W¤â¥U¬d¸ß¸Ó«ü¥O¡]°Æµ{¦¡¡^¤¤¤§¦U°Ñ¼Æ·N¸q¤Î¥Îªkªººë½T©w¸q¡C
¡A¨äµe¥X¤§®ÄªG¦p¤U¡G
½Ðª`·N¡A±q¥»½d¨Ò©Ò¾Ç¨ìªº¸gÅç¡A¤@ӳ̲©öªº PGPLOT Fortran µ{¦¡¨ã¦³¥H¤U°ò¥»®æ¦¡¡G
program pg_test
integer pgopen
real xmin, xmax, ymin, ymax
if (pgopen('/xwin') .le. 0) stop
call pgenv(xmin,xmax,ymin,ymax,0,0)
...
call pgclos
end
¤@Ó²³æªº½d¨Òµ{¦¡ pg_test.f ¡A¦b x, y [-5,5] ½d³ò¤ºµe¤@Ó¤¤¤ß¦bìÂI¡B¥b®| 2 ªº¶ê¡C
program pg_test
integer pgopen
real xmin, xmax, ymin, ymax
if (pgopen('/xwin') .le. 0) stop
xmin = -5.0
xmax = 5.0
ymin = -5.0
ymax = 5.0
call pgenv(xmin,xmax,ymin,ymax,0,0)
call pgcirc(0.0,0.0,2.0)
call pgclos
end
½sĶªº«ü¥O
gfortran pg_test.f -L /usr/local/pgplot -lpgplot -lX11
«h¥´ ./a.out <Enter> ´N¥i¥H°õ¦æ¡C
PGOPEN
³o¬O¤@Ó¾ã¼ÆȨç¼Æ¡A¤@³Q¹Bºâ´N·|¶}±ÒÅã¥Ü©Î¦L¥Xªº¤¶±¡]§Y·íªì drivers.list ©Ò¥´¶}ªº¸Ë¸m¤§¤@¡^¡A¥¦ªº¤Þ¼Æ¬O¸Ë¸m¦WºÙªº¦r¦ê¡]§t«e±ªº±×½u "/"¡A¦p "/xwin"¡^¡A¨äµ²ªGªºÈ«hªí¥Ü¤¶±¸Ë¸m¶}±Òªº¦¨¥\»P§_¡C¦pªG¬O¾ã¼Æ 0 «hªí¥Ü¶}±Ò¦¨¥\¡A«D¹sÈ¥Nªí¥¢±Ñ¡Cn¨Ï¥Î PGPLOT ªºÃ¸¹Ï¥\¯à¤§«e¤@©wn¥s¥Î³oÓ¨ç¼Æ¡A¥H¤U¬°±`¥Îªº»yªk¥Ü½d¡G
INTEGER PGOPEN
...
IF (PGOPEN('?') .LE. 0) STOP
³oªí¥Ü¦V¨Ï¥ÎªÌ¸ß°Ý¿é¥Xªí¸mÃþ§O¡A¶}±Ò¥¢±Ñ«hµ{¦¡°±¤î¡C
integer pgopen
...
if (pgopen('/xwin') .le. 0) stop
³oªí¥Üª½±µ¨Ï¥Î /xwin ¸Ë¸m¡A¤£¥²¸ß°Ý¡C¤@¼ËY¶}±Ò¥¢±Ñ«hµ{¦¡°±¤î¡C
PGENV
³]©wø¹ÏÀô¹ÒÈ¡A¥]§tµøµ¡¤j¤p¤Î¤ñ¨Ò¡Bx ¶b y ¶b½d³ò¡B¥H¤Î®y¼Ð¶b¤§µeªk¡C
CALL PGENV (XMIN, XMAX, YMIN, YMAX, JUST, AXIS)
PGLAB
¦L¤W®y¼Ð¶b¤Î¹Ï±¤W¤èªº¤å¦r¼Ðñ
CALL PGLAB (XLBL, YLBL, TOPLBL)
PGLINE
±qµ¹©wªº¤@®M N ÓȪº X(N) »P Y(N) ®y¼Ð°}¦CÈùØ¡A³sµ§µe¥Xª½½u¬q¡C
CALL PGLINE (N, X, Y)
PGPT
±qµ¹©wªº¤@®M N ÓȪº X(N) »P Y(N) ®y¼Ð°}¦CÈùØ¡A¤@¦¸µe¥XÓ§O²Å¸¹ÂI¡C²Å¸¹¤§Ãþ«¬¥i¿ï¾Ü¡A¦p¤U¹Ï¡G
¥t¥i°Ñ¦Ò PGPNTS ¡A¨C§å²Å¸¹¥i¥H¤£¤@¼Ë¡C
PGCLOS
Ãö³¬¡C¦pªG¨S¦³¨Ï¥Î¡A«hø¹Ï¶]§¹«á¨ä¿Ã¹õ¤Wªº¹Ï§Î¤]ÀHµÛµ{¦¡°õ¦æªºµ²§ô¦Ó®ø¥¢¡A¨Ï¥Î PGCLOS Åý¨Ï¥ÎªÌ¦³¾÷·|¬Ý²M·¡¹Ï§Î«á¦AÃö¹Ï¡C
CALL PGCLOS
±`¥Ç¿ù»~¤§´£¿ô
pgenv ùتº x¡By ½d³ò¨Ï¥Î¤F¾ã¼Æ
pgenv ùتº x¡By ¤W¤U¡]§Y«e¥|ӼƦr¡^»~¶Ç¤F¾ã¼Æ©Î¾ã¼ÆÅܼƶi¥h¡A ¹Ï®Ø/¶b·|µe¤£¥X¨Ó¡C
µ{¦¡ªº³Ì«á¨S¥´ call pgclos
pgclos ·|µ¹¥X«ö Enter «áÃö³¬ªº´£¥Ü¡A¦b¹Ï±®ø¥¢¤§«eµ¹¾Þ§@ªÌ¨¬°÷ªºÆ[¹î®É¶¡¡CY¥¼§@ call pgclos¡A«h°£«D¬Oµ{¦¡¥»¨ÁÙ¦b¶]©Îµ¥«Ý¡A§_«hµ{¦¡¤@¥¹µ²§ô¡A«e¥ý«eµe¥Xªº¹Ï§Î´N·|°¨¤W®ø¥¢¡C
§Ñ°O«Å§i pgopen ¬°¾ã¼Æ
pgopen ¬O¤@Ó¾ã¼Æ¨ç¼Æ¡A¤£¦P©ó¤j³¡¤À pgplot «ü¥O±Ä°Æµ{¦¡©I¥sªº¤è¦¡¡A ¦]¦¹»Ýn«Å§i¨ä¬°¾ã¼Æ¡A§_«hµLªk°õ¦æ¡C
¨Sµ¹¥¿½Tªº¨ç¦¡®w¦WºÙ©Î¸ô®|
-L ©Î -l °Ñ¼Æ¨Sµ¹©Î X11 (^¤å¦r¥À¤j¼g X ¤Î¼Æ¦r 11) ¥´¿ù¦r¡A·|³y¦¨¨ç¦¡®w³sµ²¤£¨ì¦Ó³y¦¨½sĶ¡]Ãìµ²¡^®É©ê«è¦³¨ÇªF¦è "reference" ¤£¨ì¦ÓµLªk²£¥Í¥i°õ¦æÀÉ¡C
¨ä¥L¦³¥Î¤§«ü¥O
PGSCI
³]©wÃC¦â (Set Color Index)¡AI´º¦â¬O 0¡C
PGCURS
¦b·Æ¹««ü¼Ð©Ò¦bªº¥ô¸m±µ¥ô¤@¤å¦rÁä¥i¶Ç¦^¸Ó¦ì¸mªºµ´¹ï®y¼Ð¥H¤Î©Ò«öªº¦r²Å¡A¬O«Ü¦³¥Îªº¤¬°Ê¦¡¿é¤J¤u¨ã¡C
PGBAND
»P¤Wz«ü¥OÃþ¦ü¡A¥u¬O¦h¥[¤F·Æ¹««ü¼Ð¦b²¾°Ê®É¦³¤@±ø½u³sµÛ¤W¤@¦¸¿ï¨úªºÂI¡A"Elastic band §Y¾ó¥Öµ¬"¡C
PGPAP
³]©w¹Ï®Ø (¯È±i PAPer) ¤j¤p¡]n¦b PGENV ¤§«e¨Ï¥Î¡^¡A©Òµ¹¤Jªº¨âÓ¹ê¼Æ°Ñ¼Æ¤À§O¬O x ªºªø«×¥H¤Î y ¬Û¹ï©ó x ªºªø«×¤j¤p¡C¨Ò¦p¡AYn§@¥X x Ãäªø¬O 5 ¦Tªº 4:3 ªºµe±¡A«h©I¥s PGPAP (5.0, 0.75) ¡C
¥t¥~¡A¦p¦P¨ä¥L©Ò¦³ PGPLOT °Æµ{¦¡¡A¥Î¨ì¹ê¼Æ°Ñ¼Æªº¼ÆÈ¡A¤@©wn±a¦³¤p¼ÆÂI¡A¦]¦¹¤W¨Ò¤¤¤§ PGPAP (5.0, 0.75) ¤£¥i¥H¼g§@ PGPAP (5, 0.75)¡A½Ðª`·N¡C
PGCIRC
µe¶ê¡A¤TÓ¹ê¼Æ°Ñ¼Æ¤À§O¬O x-®y¼Ð¡By-®y¼Ð¡A¥H¤Î¥b®|¡C
PGSFS
³]©w¶ñ¦âÄÝ©Ê (Set Fill-area Style)¡C·|¼vÅT PGCIRC¡BPGRECT¡BPGPOLY µe¥X¬OªÅ¤ßªº©Î¬O¶ñº¡ªº¡C
PGTEXT ¤Î PGPTXT
¦b¹Ï¤W¦L¥X¤å¦r
PGPANL
¤Á´«¨ì¹Ï±¤W¤£¦Pªº±ª©¡]¸g¥Ñ PGSUBP ©Î PGBEG ©Ò¤Á³Î¥X¨Óªº¡^
PGSLCT
¿ï¾Ü¿é¥X¸Ë¸m¡A¸Ë¸mªº¾ã¼Æ¸¹½X¬O¥Ñ¾ã¼Æ¨ç¼Æ PGOPEN ©Ò¶Ç¦^ªºÈ¡C
¨ä¥L¦³½ì¤§«ü¥O
PGBBUF »P PGEBUF
½w½Ä°Ï¥\¯à¡C§â²³¦hø¹Ï°Ê§@§¨¦b PGBBUF »P PGEBUF ¤§¶¡¡A¯à¤j´T´£ª@ø¹Ï®Ä²v¡C
µù¡G³o¬O¦]¬°¥ô¦ó·s¹Ï¹³¦b¿Ã¹õ¤Wªº§e²{¡A³£¶·¸g¥Ñ CPU ¥ý±Nµe¯À¸ê®Æ¼g¤Jµø°T°O¾ÐÅé (Video RAM¡A¡A§YÅã¥Ü¥d¤Wªþ±aªº°O¾ÐÅé) ¡A¦A§ó·sÅã¥Ü¬°µe±«G·tÂI ¡C¦]¦¹¾¨¥i¯à±N·s¤º®e³sÄò¼g¤Jµø°T°O¾ÐÅé¡A¦b¤@¦¸¨ê·s¡A·|¤ñ¸û¦³®Ä²v¡C
½sĶ»PÃìµ²
¦b¥»½Òµ{µ¹¤j®aªºµêÀÀ¾÷¾¹Àô¹Ò¤U¡An½sĶ¥Ø«e¥Ø¿ý¤Uªº pgdemo1.f ¡An¥´¡G
gfortran -o pgdemo1.x pgdemo1.f -L /usr/local/pgplot -lpgplot -lX11
³o¬O¦]¬° UNIX X-µøµ¡©Ò·|»Ýnªº libX11.a ¤w¸g©ñ¦b¨t²Î¥i¨Ó·j´M±o¨ìªº¥Ø¿ý¤U¡C
¦pªG§A¨Ï¥Î cygwin¡A¨Ã°²©ñ¦w¸Ëªº¥Ø¿ý¬O¦b /usr/local/pgplot¡A«h¥i¯àn§â°Æµ{¦¡®wÃìµ²²¾¸m¨ì«á±¡A¦p¤U¡G
g77 -o pg.exe pg.f -L /usr/local/pgplot -lpgplot -lX11
¦bpºâª«²z¹êÅç«Ç²{¦æªº¦w¸Ë³]©w¤U¡A¦b¦s©ñ§A¦Û¤wµ{¦¡¡]¦b¦¹¥H pgdemo1.f ¬°¨Ò¡^ªº¥Ø¿ý¤U¥´¡G
f77 -o pgdemo1.x -nobackshash -L/usr/X11R6/lib -lX11 -lpgplot pgdemo1.f
¨ä¤¤ -nobackslash °Ñ¼Æ¬O¬°¤FÅý¹Ïªº¼ÐÃD¤å¦r¥i¥HÅã¥Ü¤W¼Ð¡]¦¸¤è¡^¡A³o¦b pgplot ¤¤n¥Î¨ì¤Ï±×½u "\" ²Å¸¹¡A¦b¦³¨Ç compiler ·|¸àÄÀ¤Ï±×½u²Å¸¹¦³¯S©w·N¸q¡A¦ý¦b¦¹¥u¬O pgplot ªº°Æµ{¦¡ùØÀYn¥Î¡A¦]¦¹«ü©w no back-slash¡C ¡]Y¬O g77 «h¬O -fno_back_slash¡^
¦pªG§A¨S¦³ºÞ²zªÌÅv¡A«h§Aªº libpgplot.a (©Î .so) Àɤ£·|¦b¨t²Î¤½¦@¥Ø¿ýùØ¡C³o®ÉnÃìµ² pgplot °Æµ{¦¡®w«h»Ýn¦b -lpgplot °Ñ¼Æªº«e±µ¹¸ô®| -L/NFS_home/u12345678/pgplot ¡C
½u¤W¤â¥U
©x¤èºô¯¸¨Ï¥Î»¡©ú¡Ghttp://www.astro.caltech.edu/~tjp/pgplot/contents.html
½d¨Òµ{¦¡
³oùر¦³«Ü¦h¥B«nªº¥\¯à¥Ü½d¡A¦³¦hºØø¹Ïªº§ÎºA¡C¨ä¤¤ EX01 ªº¥±§@¹Ï¥Ü½d¬O³Ì°ò¥»ªº¡A¤@©wn·|¡C
¥Ü½d¦â¶ô¡B¦r«¬¡B°O¸¹ªº¬¡¥Î¥H¤Î½u¼e¡B½u«¬ªºÅܤÆ
¦UÃþ«¬µ¥°ª½uªºÃ¸»s
¦âÃС]½Õ¦âªO¡^¥Ü½d
¤ä´©¥H·Æ¹«¦b¥±¤W¨ú±oÂIªº¦ì¸m¥H¨Ñ¿é¤J¼Æ¾Úªº¥\¯à¡A¤]¤ä´©¦b¹Ï±¤W«ö¤å¦rÁä·|¿ë»{¡C
»P¤W¥Ü½dÃþ¦ü¡A¦ý§ó¼W¥[§Y®É¦Û«öÁäŪ¤J¦r¤¸ªº¥\¯à
¥Ü½dÁôÂýuªºÃ¸¹Ï¥\¯à
³oÓµ{¦¡´£¨Ñ¤F¤@Ó¤u¨ã°Æµ{¦¡¡A¥¦¯à§â¤@Ó 3D ªº±§ë¼v¦b 2D ¥±¤W¡C
µe¯À¹ÏÀɪº¥Ü½d
¤£¦P³¡¤À¹Ï¤§I´º¦â¤]¥H§ïÅÜ
°Êµe¥Ü½d¤Î¤ñ¸û
¥H PGPAP §ïÅܹϮتº¤j¤p¡]«D±`¹ê¥Î¡^
¥i¨Ï¥ÎÂù«ªº device¡A¨Ã¥B¨ä¤¤¤@Ó¥i¥H§@¬°¿ï³æªº¥Ü½d¡C¦P¤@±i¹Ï¤]¥i¥H¥]§t¦hÓ¤p¹Ï¡C
¦b¹Ï¤W´£¨Ñ¤@Ó¥i¥H½s¿è¿é¤J°Ñ¼ÆªºÄæ¦ìµ¹µ{¦¡
²£¥Í¹Ï¤§®É¶¡¡B¤é´Á¥H¤Î¨Ï¥ÎªÌ¤§¸ê°Tªº¦L¥X
¦UÃþªø±ø¹Ï
¥Ü½d 3D ´X¦óª«¥ó¤§Âà°Ê
À³¥Î½d¨Òµ{¦¡
staticel.f¡]¹q¤O½u¦Û°Ê®i¥Üµ{¦¡¡A»Ý¥s¥Î¶Ã¼Æ²£¥Í¾¹°Æµ{¦¡ ran3.f¡^
¨ä¥L¸ê·½
¨Ï¥Î PGPLOT §@¬°Ã¸¹Ï¤ÞÀºªº SPLASH ¤Ñ¤å³nÅ餧 FAQ
http://users.monash.edu.au/~dprice/splash/faq.htmlPGplot ªº¦w¸Ë»P±Ð¾Ç¡AÃþ¦ü¥»ºô¯¸¡]^¤å¡^¡A¦ý¦³¤£¦P½d¨Ò
http://www.ibiblio.org/pub/linux/docs/LDP/linuxfocus/English/November2002/article268.shtmlÃö©ó¨Ï¥Î gif ®æ¦¡¹ÏÀɧ@¿é¥Xªº¤@¨Ç¸ê°T
http://www.astro.caltech.edu/~tjp/pgplot/gidriv.html