App-SeismicUnixGui

 view release on metacpan or  search on metacpan

lib/App/SeismicUnixGui/sunix/plot/psimage.pm  view on Meta::CPAN

 ybox=1.5		 offset in inches of bottom side of axes box	

 width=6.0		 width in inches of axes box			

 height=8.0		 height in inches of axes box			

 x1beg=x1min		 value at which axis 1 begins			

 x1end=x1max		 value at which axis 1 ends			

 d1num=0.0		 numbered tic interval on axis 1 (0.0 for automatic)

 f1num=x1min		 first numbered tic on axis 1 (used if d1num not 0.0)

 n1tic=1		 number of tics per numbered tic on axis 1	

 grid1=none		 grid lines on axis 1 - none, dot, dash, or solid

 label1=		 label on axis 1				

 x2beg=x2min		 value at which axis 2 begins			

 x2end=x2max		 value at which axis 2 ends			

 d2num=0.0		 numbered tic interval on axis 2 (0.0 for automatic)

 f2num=x2min		 first numbered tic on axis 2 (used if d2num not 0.0)

 n2tic=1		 number of tics per numbered tic on axis 2	

 grid2=none		 grid lines on axis 2 - none, dot, dash, or solid

 label2=		 label on axis 2				

 labelfont=Helvetica	 font name for axes labels			

 labelsize=18		 font size for axes labels			

 title=		 title of plot					

 titlefont=Helvetica-Bold font name for title				

 titlesize=24		  font size for title				

 titlecolor=black	 color of title					

 axescolor=black	 color of axes					

 gridcolor=black	 color of grid					

 axeswidth=1            width (in points) of axes                      

 ticwidth=axeswidth     width (in points) of tic marks			

 gridwidth=axeswidth    width (in points) of grid lines		

 style=seismic		 normal (axis 1 horizontal, axis 2 vertical) or	

			 seismic (axis 1 vertical, axis 2 horizontal)	

 legend=0	         =1 display the color scale			

 lnice=0                =1 nice legend arrangement                     

                        (overrides ybox,lx,width,height parameters)    

 lstyle=vertleft 	Vertical, axis label on left side   		

			 =vertright (Vertical, axis label on right side)

			 =horibottom (Horizontal, axis label on bottom)	

 units=		 unit label for legend				

 legendfont=times_roman10    font name for title			

 following are defaults for lstyle=0. They are changed for other lstyles

 lwidth=1.2		 colorscale (legend) width in inches 		

 lheight=height/3     	 colorscale (legend) height in inches		

 lx=1.0		 colorscale (legend) x-position in inches	

 ly=(height-lheight)/2+xybox    colorscale (legend) y-position in pixels

 lbeg= lmin or wclip-5*perc    value at which legend axis begins	

 lend= lmax or bclip+5*perc    value at which legend axis ends        	

 ldnum=0.0	 numbered tic interval on legend axis (0.0 for automatic)

 lfnum=lmin	 first numbered tic on legend axis (used if d1num not 0.0)

 lntic=1	 number of tics per numbered tic on legend axis 

 lgrid=none	 grid lines on legend axis - none, dot, dash, or solid



 curve=curve1,curve2,...  file(s) containing points to draw curve(s)   

 npair=n1,n2,n2,...            number(s) of pairs in each file         

 curvecolor=black,..	 color of curve(s)				

 curvewidth=axeswidth	 width (in points) of curve(s)			

 curvedash=0            solid curve(s), dash indices 1,...,11 produce  

                        curve(s) with various dash styles              



 infile=none            filename of second attribute n1xn2 array       

                        values must be from range 0.0 - 1.0            

                        (plain unformatted C-style file)               

 bckgr=0.5              background gray value				



 NOTES:								

 The curve file is an ascii file with the points specified as x1 x2 	

 pairs, one pair to a line.  A "vector" of curve files and curve	

 colors may be specified as curvefile=file1,file2,etc.			

 and curvecolor=color1,color2,etc, and the number of pairs of values   

 in each file as npair=npair1,npair2,... .				



 You may eliminate the blocky appearance of psimages by adjusting the  

 d1s= and d2s= parameters, so that psimages appear similar to ximages.	



 All color specifications may also be made in X Window style Hex format

 example:   axescolor=#255						



 Some example colormap settings:					

 red white blue: wrgb=1.0,0,0 grgb=1.0,1.0,1.0 brgb=0,0,1.0 		

 white red blue: wrgb=1.0,1.0,1.0 grgb=1.0,0.0,0.0 brgb=0,0,1.0 	

 blue red white: wrgb=0.0,0.0,1.0 grgb=1.0,0.0,0.0 brgb=1.0,1.0,1.0 	

 red green blue: wrgb=1.0,0,0 grgb=0,1.0,0 brgb=0,0,1.0		

 orange light-blue green: wrgb=1.0,.5,0 grgb=0,.7,1.0 brgb=0,1.0,0	

 red light-blue dark blue: wrgb=0.0,0,1.0 grgb=0,1.0,1.0 brgb=0,0,1.0 	



 Legal font names are:							

 AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique"

 Bookman-Demi Bookman-DemiItalic Bookman-Light Bookman-LightItalic 

 Courier Courier-Bold Courier-BoldOblique Courier-Oblique 

 Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique 

 Helvetica-Narrow Helvetica-Narrow-Bold Helvetica-Narrow-BoldOblique 

 Helvetica-Narrow-Oblique NewCentrySchlbk-Bold"

 NewCenturySchlbk-BoldItalic NewCenturySchlbk-Roman Palatino-Bold  

 Palatino-BoldItalic Palatino-Italics Palatino-Roman 

 SanSerif-Bold SanSerif-BoldItalic SanSerif-Roman 

 Symbol Times-Bold Times-BoldItalic 

 Times-Roman Times-Italic ZapfChancery-MediumItalic 







 Author:  Dave Hale, Colorado School of Mines, 05/29/90

 MODIFIED:  Craig Artley, Colorado School of Mines, 08/30/91

	    BoundingBox moved to top of PostScript output

 MODIFIED:  Craig Artley, Colorado School of Mines, 12/16/93

	    Added color options (Courtesy of Dave Hale, Advance Geophysical).

 Modified: Morten Wendell Pedersen, Aarhus University, 23/3-97

           Added ticwidth,axeswidth, gridwidth parameters 

 MODIFIED: Torsten Schoenfelder, Koeln, Germany 006/07/97

          colorbar (legend) (as in ximage (by Berend Scheffers, Delft))

 MODIFIED: Brian K. Macy, Phillips Petroleum, 01/14/99

	    Added curve plotting option

 MODIFIED: Torsten Schoenfelder, Koeln, Germany 02/10/99

          color scale with interpolation of three colors

 MODIFIED: Ekkehart Tessmer, University of Hamburg, Germany, 08/22/2007

          Added dashing option to curve plotting



=head2 User's notes (Juan Lorenzo)
untested

=cut


=head2 CHANGES and their DATES

=cut

use Moose;
our $VERSION = '0.0.1';


=head2 Import packages

=cut

use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';

use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_su $suffix_bin);
use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';


=head2 instantiation of packages

=cut

my $get					= L_SU_global_constants->new();
my $Project				= Project_config->new();
my $DATA_SEISMIC_SU		= $Project->DATA_SEISMIC_SU();
my $DATA_SEISMIC_BIN	= $Project->DATA_SEISMIC_BIN();
my $DATA_SEISMIC_TXT	= $Project->DATA_SEISMIC_TXT();

my $var				= $get->var();
my $on				= $var->{_on};
my $off				= $var->{_off};
my $true			= $var->{_true};
my $false			= $var->{_false};
my $empty_string	= $var->{_empty_string};

=head2 Encapsulated
hash of private variables

=cut

my $psimage			= {
	_axescolor					=> '',
	_axeswidth					=> '',
	_bckgr					=> '',
	_bclip					=> '',
	_bhls					=> '',
	_bperc					=> '',
	_bps					=> '',
	_brgb					=> '',
	_clip					=> '',
	_curve					=> '',
	_curvecolor					=> '',
	_curvedash					=> '',
	_curvefile					=> '',
	_curvewidth					=> '',
	_d1					=> '',
	_d1num					=> '',
	_d1s					=> '',
	_d2					=> '',
	_d2num					=> '',
	_d2s					=> '',
	_f1					=> '',
	_f1num					=> '',
	_f2					=> '',
	_f2num					=> '',
	_ghls					=> '',
	_grgb					=> '',
	_grid1					=> '',
	_grid2					=> '',
	_gridcolor					=> '',
	_gridwidth					=> '',
	_height					=> '',
	_infile					=> '',
	_label1					=> '',
	_label2					=> '',
	_labelfont					=> '',
	_labelsize					=> '',
	_lbeg					=> '',
	_ldnum					=> '',
	_legend					=> '',
	_legendfont					=> '',
	_lend					=> '',
	_lfnum					=> '',
	_lgrid					=> '',
	_lheight					=> '',
	_lnice					=> '',
	_lntic					=> '',
	_lstyle					=> '',
	_lwidth					=> '',
	_lx					=> '',
	_ly					=> '',
	_n1					=> '',
	_n1tic					=> '',
	_n2					=> '',
	_n2tic					=> '',
	_npair					=> '',
	_perc					=> '',
	_style					=> '',
	_threecolor					=> '',
	_ticwidth					=> '',
	_title					=> '',
	_titlecolor					=> '',
	_titlefont					=> '',
	_titlesize					=> '',
	_units					=> '',
	_verbose					=> '',
	_wclip					=> '',
	_whls					=> '',
	_width					=> '',
	_wperc					=> '',
	_wrgb					=> '',
	_x1beg					=> '',
	_x1end					=> '',
	_x2beg					=> '',
	_x2end					=> '',
	_xbox					=> '',
	_ybox					=> '',
	_Step					=> '',
	_note					=> '',

};

=head2 sub Step

collects switches and assembles bash instructions
by adding the program name

=cut

 sub  Step {

	$psimage->{_Step}     = 'psimage'.$psimage->{_Step};
	return ( $psimage->{_Step} );

 }


=head2 sub note

collects switches and assembles bash instructions
by adding the program name

=cut

 sub  note {

	$psimage->{_note}     = 'psimage'.$psimage->{_note};
	return ( $psimage->{_note} );

 }



=head2 sub clear

=cut

 sub clear {

		$psimage->{_axescolor}			= '';
		$psimage->{_axeswidth}			= '';
		$psimage->{_bckgr}			= '';
		$psimage->{_bclip}			= '';
		$psimage->{_bhls}			= '';
		$psimage->{_bperc}			= '';
		$psimage->{_bps}			= '';
		$psimage->{_brgb}			= '';
		$psimage->{_clip}			= '';
		$psimage->{_curve}			= '';
		$psimage->{_curvecolor}			= '';
		$psimage->{_curvedash}			= '';
		$psimage->{_curvefile}			= '';
		$psimage->{_curvewidth}			= '';
		$psimage->{_d1}			= '';
		$psimage->{_d1num}			= '';
		$psimage->{_d1s}			= '';
		$psimage->{_d2}			= '';
		$psimage->{_d2num}			= '';
		$psimage->{_d2s}			= '';
		$psimage->{_f1}			= '';
		$psimage->{_f1num}			= '';
		$psimage->{_f2}			= '';
		$psimage->{_f2num}			= '';
		$psimage->{_ghls}			= '';
		$psimage->{_grgb}			= '';
		$psimage->{_grid1}			= '';
		$psimage->{_grid2}			= '';
		$psimage->{_gridcolor}			= '';
		$psimage->{_gridwidth}			= '';
		$psimage->{_height}			= '';
		$psimage->{_infile}			= '';
		$psimage->{_label1}			= '';
		$psimage->{_label2}			= '';
		$psimage->{_labelfont}			= '';
		$psimage->{_labelsize}			= '';
		$psimage->{_lbeg}			= '';
		$psimage->{_ldnum}			= '';
		$psimage->{_legend}			= '';
		$psimage->{_legendfont}			= '';
		$psimage->{_lend}			= '';
		$psimage->{_lfnum}			= '';
		$psimage->{_lgrid}			= '';
		$psimage->{_lheight}			= '';
		$psimage->{_lnice}			= '';
		$psimage->{_lntic}			= '';
		$psimage->{_lstyle}			= '';
		$psimage->{_lwidth}			= '';
		$psimage->{_lx}			= '';
		$psimage->{_ly}			= '';
		$psimage->{_n1}			= '';
		$psimage->{_n1tic}			= '';
		$psimage->{_n2}			= '';
		$psimage->{_n2tic}			= '';
		$psimage->{_npair}			= '';
		$psimage->{_perc}			= '';
		$psimage->{_style}			= '';
		$psimage->{_threecolor}			= '';
		$psimage->{_ticwidth}			= '';
		$psimage->{_title}			= '';
		$psimage->{_titlecolor}			= '';
		$psimage->{_titlefont}			= '';
		$psimage->{_titlesize}			= '';
		$psimage->{_units}			= '';
		$psimage->{_verbose}			= '';
		$psimage->{_wclip}			= '';
		$psimage->{_whls}			= '';
		$psimage->{_width}			= '';
		$psimage->{_wperc}			= '';
		$psimage->{_wrgb}			= '';
		$psimage->{_x1beg}			= '';
		$psimage->{_x1end}			= '';
		$psimage->{_x2beg}			= '';
		$psimage->{_x2end}			= '';
		$psimage->{_xbox}			= '';
		$psimage->{_ybox}			= '';
		$psimage->{_Step}			= '';
		$psimage->{_note}			= '';
 }


=head2 sub axescolor 


=cut

 sub axescolor {

	my ( $self,$axescolor )		= @_;
	if ( $axescolor ne $empty_string ) {

		$psimage->{_axescolor}		= $axescolor;
		$psimage->{_note}		= $psimage->{_note}.' axescolor='.$psimage->{_axescolor};
		$psimage->{_Step}		= $psimage->{_Step}.' axescolor='.$psimage->{_axescolor};

	} else { 
		print("psimage, axescolor, missing axescolor,\n");
	 }
 }

lib/App/SeismicUnixGui/sunix/plot/psimage.pm  view on Meta::CPAN

=head2 sub labelsize 


=cut

 sub labelsize {

	my ( $self,$labelsize )		= @_;
	if ( $labelsize ne $empty_string ) {

		$psimage->{_labelsize}		= $labelsize;
		$psimage->{_note}		= $psimage->{_note}.' labelsize='.$psimage->{_labelsize};
		$psimage->{_Step}		= $psimage->{_Step}.' labelsize='.$psimage->{_labelsize};

	} else { 
		print("psimage, labelsize, missing labelsize,\n");
	 }
 }


=head2 sub lbeg 


=cut

 sub lbeg {

	my ( $self,$lbeg )		= @_;
	if ( $lbeg ne $empty_string ) {

		$psimage->{_lbeg}		= $lbeg;
		$psimage->{_note}		= $psimage->{_note}.' lbeg='.$psimage->{_lbeg};
		$psimage->{_Step}		= $psimage->{_Step}.' lbeg='.$psimage->{_lbeg};

	} else { 
		print("psimage, lbeg, missing lbeg,\n");
	 }
 }


=head2 sub ldnum 


=cut

 sub ldnum {

	my ( $self,$ldnum )		= @_;
	if ( $ldnum ne $empty_string ) {

		$psimage->{_ldnum}		= $ldnum;
		$psimage->{_note}		= $psimage->{_note}.' ldnum='.$psimage->{_ldnum};
		$psimage->{_Step}		= $psimage->{_Step}.' ldnum='.$psimage->{_ldnum};

	} else { 
		print("psimage, ldnum, missing ldnum,\n");
	 }
 }


=head2 sub legend 


=cut

 sub legend {

	my ( $self,$legend )		= @_;
	if ( $legend ne $empty_string ) {

		$psimage->{_legend}		= $legend;
		$psimage->{_note}		= $psimage->{_note}.' legend='.$psimage->{_legend};
		$psimage->{_Step}		= $psimage->{_Step}.' legend='.$psimage->{_legend};

	} else { 
		print("psimage, legend, missing legend,\n");
	 }
 }


=head2 sub legendfont 


=cut

 sub legendfont {

	my ( $self,$legendfont )		= @_;
	if ( $legendfont ne $empty_string ) {

		$psimage->{_legendfont}		= $legendfont;
		$psimage->{_note}		= $psimage->{_note}.' legendfont='.$psimage->{_legendfont};
		$psimage->{_Step}		= $psimage->{_Step}.' legendfont='.$psimage->{_legendfont};

	} else { 
		print("psimage, legendfont, missing legendfont,\n");
	 }
 }


=head2 sub lend 


=cut

 sub lend {

	my ( $self,$lend )		= @_;
	if ( $lend ne $empty_string ) {

		$psimage->{_lend}		= $lend;
		$psimage->{_note}		= $psimage->{_note}.' lend='.$psimage->{_lend};
		$psimage->{_Step}		= $psimage->{_Step}.' lend='.$psimage->{_lend};

	} else { 
		print("psimage, lend, missing lend,\n");
	 }
 }


=head2 sub lfnum 


=cut

 sub lfnum {

	my ( $self,$lfnum )		= @_;
	if ( $lfnum ne $empty_string ) {

		$psimage->{_lfnum}		= $lfnum;
		$psimage->{_note}		= $psimage->{_note}.' lfnum='.$psimage->{_lfnum};
		$psimage->{_Step}		= $psimage->{_Step}.' lfnum='.$psimage->{_lfnum};

	} else { 
		print("psimage, lfnum, missing lfnum,\n");
	 }
 }


=head2 sub lgrid 


=cut

 sub lgrid {

	my ( $self,$lgrid )		= @_;
	if ( $lgrid ne $empty_string ) {

		$psimage->{_lgrid}		= $lgrid;
		$psimage->{_note}		= $psimage->{_note}.' lgrid='.$psimage->{_lgrid};
		$psimage->{_Step}		= $psimage->{_Step}.' lgrid='.$psimage->{_lgrid};

	} else { 
		print("psimage, lgrid, missing lgrid,\n");



( run in 1.101 second using v1.01-cache-2.11-cpan-d8267643d1d )