From: Samuel H. D. Jr. <sd...@sp...> - 2002-11-05 19:45:55
|
Plplot List, I'm running Plplot version 5.1.0 on a Mac under OS 9.2.1 using Absoft Fortran version. 8.0. I'm trying to have Plplot a series of graphs, three curves per graph with axes numbering, axes labels and titles. The curves are being plotted, but I can't seem to get Plplot to output the axes numbering, labeling and titles. Further, I'd lime to have the horizontal axis to be twice as long as the vertical axis. The routine that does the plotting is given below. Does anyone have any ideas as to what I'm doing wrong? Thanks in advance. Sam Dupree. subroutine ssi_residual_plot implicit double precision ( a - h, o - z, A - H, O - Z ) include 'state_space.inc' include 'astrodyn_const.inc' include 'diva_support.inc' include 'iounits.inc' include 'lunar_state.inc' include 'phys_const.inc' include 'planet_eph_control.inc' include 'residuals.inc' character * 80 version character * 132 text double precision J2000, 1 x8min, x8max, x8dist, 2 y8min, y8max, y8dist, xminp, xmaxp logical done integer max_pts, nxdiv, nydiv parameter ( max_pts = 400 ) real * 4 xmin, xmax, xdist, ymin, ymax, ydist, 1 delta_max(9), delta_min(9), 2 tjd(max_pts), diff(max_pts,9) data nxdiv/ 4 /, nydiv/ 4 / c ---------------------------------------------------------------------- c set the frame center and reference frame IDs c ---------------------------------------------------------------------- l = frame_center m = ref_frame_id c ---------------------------------------------------------------------- c set the time span for the plots c ---------------------------------------------------------------------- x8min = J2000() + et_start x8max = J2000() + et_stop c ---------------------------------------------------------------------- c call SCALE1() to generate "nice" numbers for the horizontal axis c ---------------------------------------------------------------------- call SCALE1( x8min, x8max, nxdiv, xminp, xmaxp, x8dist ) xmax = xmaxp xmin = xminp xdist = x8dist c ---------------------------------------------------------------------- c call plgver_() to obtain the Plplot version c ---------------------------------------------------------------------- call plgver_( version ) c ---------------------------------------------------------------------- c output the Plplot version to the report c ---------------------------------------------------------------------- write( luncrt, 2000 ) CHAR(12), version write( lunprt, 2000 ) CHAR(12), version c ---------------------------------------------------------------------- c call plscolbg_() to set the background color in terms of red, c green, and blue c ---------------------------------------------------------------------- call plscolbg_( 000, 000, 000 ) c ---------------------------------------------------------------------- c call plinit_() to initialize Plplot c ---------------------------------------------------------------------- call plinit_() c ---------------------------------------------------------------------- c call plssub_() to have one plot per subframe c ---------------------------------------------------------------------- call plssub_( 1, 1 ) c ---------------------------------------------------------------------- c generate plots of the Solar System Barycentric position, velocity c and RIC position residuals for all objects c ---------------------------------------------------------------------- do i = 1, state_space_size if( ss_to_cs_index(i) .ne. libration_index ) then j = state_space_to_eph( i ) lunit = lundif( j ) do k = 1, 9 delta_max(k) = max_resid(k,i) delta_min(k) = min_resid(k,i) end do do k = 1, 9, 3 rewind lunit done = .false. y8max = max( delta_max(k ), delta_max(k+1), 1 delta_max(k+2) ) y8min = min( delta_min(k ), delta_min(k+1), 1 delta_min(k+2) ) call SCALE1( y8min, y8max, nydiv, xminp, xmaxp, y8dist ) ymax = xmaxp ymin = xminp ydist = y8dist call plcol0_( 13 ) call plenv_( xmin, xmax, ymin, ymax, 0, 0 ) call plbox_( 'bcnst', xdist, 0, 'bcnstv', ydist, 0 ) if( k .lt. 4 ) then text = '#frSolar System Barycenter '// 1 TRIM(planet_names(j))// 2 ' Position Residuals (E-C) - DIVA' elseif( k .lt. 7 )then text = '#frSolar System Barycenter '// 1 TRIM(planet_names(j))// 2 ' Velocity Residuals (E-C) - DIVA' else text = '#frSolar System Barycenter '// 1 TRIM(planet_names(j))// 2 ' RIC Position Residuals (E-C) - DIVA' end if call plcol0_( 6 ) call pllab_( 'Julian Day', 'Residuals (km)', text ) do while( .not. done ) npts= 0 do ii = 1, max_pts read( unit = lunit, fmt = *, iostat = iret ) 1 tjd(ii), ( diff(ii,jj), jj = 1, 9 ) if( iret .ne. 0 ) then done = .true. exit else npts = ii end if end do if( npts .ne. 0 ) then call plcol0_( 1 ) call plline_( npts, tjd(1), diff(1, k ) ) call plcol0_( 3 ) call plline_( npts, tjd(1), diff(1, k+1) ) call plcol0_( 9 ) call plline_( npts, tjd(1), diff(1, k+2) ) end if end do call pleop_() end do end if end do if( .not. state_space_sel(18) ) then i = state_space_size + 1 j = 1 lunit = lundif( j ) do k = 1, 9 delta_max(k) = max_resid(k,i) delta_min(k) = min_resid(k,i) end do do k = 1, 9, 3 rewind lunit done = .false. y8max = max( delta_max(k ), delta_max(k+1), 1 delta_max(k+2) ) y8min = min( delta_min(k ), delta_min(k+1), 1 delta_min(k+2) ) call SCALE1( y8min, y8max, nydiv, xminp, xmaxp, y8dist ) ymax = xmaxp ymin = xminp ydist = y8dist call plcol0_( 13 ) call plenv_( xmin, xmax, ymin, ymax, 0, 0 ) call plbox_( 'bcnst', xdist, 0, 'bcnstv', ydist, 0 ) if( k .lt. 4 ) then text = '#frSolar System Barycenter '// 1 TRIM(planet_names(j))// 2 ' Position Residuals (E-C) - DIVA' elseif( k .lt. 7 )then text = '#frSolar System Barycenter '// 1 TRIM(planet_names(j))// 2 ' Velocity Residuals (E-C) - DIVA' else text = '#frSolar System Barycenter '// 1 TRIM(planet_names(j))// 2 ' RIC Position Residuals (E-C) - DIVA' end if call plcol0_( 6 ) call pllab_( 'Julian Day', 'Residuals (km)', text ) do while( .not. done ) npts= 0 do ii = 1, max_pts read( unit = lunit, fmt = *, iostat = iret ) 1 tjd(ii), ( diff(ii,jj), jj = 1, 9 ) if( iret .ne. 0 ) then done = .true. exit else npts = ii end if end do if( npts .ne. 0 ) then call plcol0_( 1 ) call plline_( npts, tjd(1), diff(1, k ) ) call plcol0_( 3 ) call plline_( npts, tjd(1), diff(1, k+1) ) call plcol0_( 9 ) call plline_( npts, tjd(1), diff(1, k+2) ) end if end do call pleop_() end do end if c ---------------------------------------------------------------------- c call plend_() to close Plplot c ---------------------------------------------------------------------- call plend_() c ---------------------------------------------------------------------- c return to the calling routine c ---------------------------------------------------------------------- return c ---------------------------------------------------------------------- c format statements c ---------------------------------------------------------------------- 2000 format( a, //, ' ', t5, 'Plplot version: ', a, // ) end -- ------------------------------------------------------------------------ Samuel H. Dupree, Jr. sd...@sp... 600 West Harvey Street Apartment A-703 http://www.speakeasy.org/~sdupree/ Philadelphia, PA 19144-4345, USA HOME: 215-842-3663 WORK: 610-531-7994 FAX: 610-531-3145 "What does it take to travel in space? The will to do it.." - Dr. Wernher von Braun ------------------------------------------------------------------------ |