LCOV - code coverage report
Current view: top level - star/private - pgstar_history_panels.f90 (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 307 0
Test Date: 2025-05-08 18:23:42 Functions: 0.0 % 20 0

            Line data    Source code
       1              : ! ***********************************************************************
       2              : !
       3              : !   Copyright (C) 2013  The MESA Team
       4              : !
       5              : !   This program is free software: you can redistribute it and/or modify
       6              : !   it under the terms of the GNU Lesser General Public License
       7              : !   as published by the Free Software Foundation,
       8              : !   either version 3 of the License, or (at your option) any later version.
       9              : !
      10              : !   This program is distributed in the hope that it will be useful,
      11              : !   but WITHOUT ANY WARRANTY; without even the implied warranty of
      12              : !   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      13              : !   See the GNU Lesser General Public License for more details.
      14              : !
      15              : !   You should have received a copy of the GNU Lesser General Public License
      16              : !   along with this program. If not, see <https://www.gnu.org/licenses/>.
      17              : !
      18              : ! ***********************************************************************
      19              : 
      20              :       module pgstar_history_panels
      21              : 
      22              :       use star_private_def
      23              :       use const_def, only: dp
      24              :       use pgstar_support
      25              :       use star_pgstar
      26              : 
      27              :       implicit none
      28              : 
      29              :       contains
      30              : 
      31            0 :       subroutine History_Panels1_plot(id, device_id, ierr)
      32              :          integer, intent(in) :: id, device_id
      33              :          integer, intent(out) :: ierr
      34              :          type (star_info), pointer :: s
      35              :          ierr = 0
      36            0 :          call get_star_ptr(id, s, ierr)
      37            0 :          if (ierr /= 0) return
      38            0 :          call pgslct(device_id)
      39            0 :          call pgbbuf()
      40            0 :          call pgeras()
      41              :          call do_History_Panels1_plot(s, id, device_id, &
      42              :             s% pg% History_Panels1_xleft, s% pg% History_Panels1_xright, &
      43              :             s% pg% History_Panels1_ybot, s% pg% History_Panels1_ytop, .false., &
      44            0 :             s% pg% History_Panels1_title, s% pg% History_Panels1_txt_scale, ierr)
      45            0 :          if (ierr /= 0) return
      46            0 :          call pgebuf()
      47              :       end subroutine History_Panels1_plot
      48              : 
      49              : 
      50            0 :       subroutine do_History_Panels1_plot(s, id, device_id, &
      51              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
      52              :          type (star_info), pointer :: s
      53              :          integer, intent(in) :: id, device_id
      54              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
      55              :          logical, intent(in) :: subplot
      56              :          character (len=*), intent(in) :: title
      57              :          integer, intent(out) :: ierr
      58              :          call do_history_panels_plot( &
      59              :             id, s, device_id, &
      60              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
      61              :             s% pg% History_Panels1_xaxis_name, &
      62              :             s% pg% History_Panels1_automatic_star_age_units, &
      63              :             s% pg% History_Panels1_xmin, &
      64              :             s% pg% History_Panels1_xmax, &
      65              :             s% pg% History_Panels1_dxmin, &
      66              :             s% pg% History_Panels1_xmargin, &
      67              :             s% pg% History_Panels1_max_width, &
      68              :             s% pg% History_Panels1_num_panels, &
      69              :             s% pg% History_Panels1_other_ymin, &
      70              :             s% pg% History_Panels1_other_ymax, &
      71              :             s% pg% History_Panels1_other_yaxis_reversed, &
      72              :             s% pg% History_Panels1_other_yaxis_log, &
      73              :             s% pg% History_Panels1_same_yaxis_range, &
      74              :             s% pg% History_Panels1_other_dymin, &
      75              :             s% pg% History_Panels1_points_name, &
      76              :             s% pg% History_Panels1_other_ymargin, &
      77              :             s% pg% History_Panels1_other_yaxis_name, &
      78              :             s% pg% History_Panels1_ymin, &
      79              :             s% pg% History_Panels1_ymax, &
      80              :             s% pg% History_Panels1_xaxis_reversed, &
      81              :             s% pg% History_Panels1_yaxis_reversed, &
      82              :             s% pg% History_Panels1_xaxis_log, &
      83              :             s% pg% History_Panels1_yaxis_log, &
      84              :             s% pg% History_Panels1_dymin, &
      85              :             s% pg% History_Panels1_ymargin, &
      86              :             s% pg% History_Panels1_yaxis_name, &
      87              :             s% pg% History_Panels1_use_decorator, &
      88              :             s% pg% History_Panels1_pgstar_decorator, &
      89            0 :             ierr)
      90            0 :       end subroutine do_History_Panels1_plot
      91              : 
      92              : 
      93            0 :       subroutine History_Panels2_plot(id, device_id, ierr)
      94              :          integer, intent(in) :: id, device_id
      95              :          integer, intent(out) :: ierr
      96              :          type (star_info), pointer :: s
      97              :          include 'formats'
      98              :          ierr = 0
      99            0 :          call get_star_ptr(id, s, ierr)
     100            0 :          if (ierr /= 0) return
     101            0 :          call pgslct(device_id)
     102            0 :          call pgbbuf()
     103            0 :          call pgeras()
     104              :          call do_History_Panels2_plot(s, id, device_id, &
     105              :             s% pg% History_Panels2_xleft, s% pg% History_Panels2_xright, &
     106              :             s% pg% History_Panels2_ybot, s% pg% History_Panels2_ytop, .false., &
     107            0 :             s% pg% History_Panels2_title, s% pg% History_Panels2_txt_scale, ierr)
     108            0 :          if (ierr /= 0) return
     109            0 :          call pgebuf()
     110              :       end subroutine History_Panels2_plot
     111              : 
     112              : 
     113            0 :       subroutine do_History_Panels2_plot(s, id, device_id, &
     114              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
     115              :          type (star_info), pointer :: s
     116              :          integer, intent(in) :: id, device_id
     117              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
     118              :          logical, intent(in) :: subplot
     119              :          character (len=*), intent(in) :: title
     120              :          integer, intent(out) :: ierr
     121              :          call do_history_panels_plot( &
     122              :             id, s, device_id, &
     123              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     124              :             s% pg% History_Panels2_xaxis_name, &
     125              :             s% pg% History_Panels2_automatic_star_age_units, &
     126              :             s% pg% History_Panels2_xmin, &
     127              :             s% pg% History_Panels2_xmax, &
     128              :             s% pg% History_Panels2_dxmin, &
     129              :             s% pg% History_Panels2_xmargin, &
     130              :             s% pg% History_Panels2_max_width, &
     131              :             s% pg% History_Panels2_num_panels, &
     132              :             s% pg% History_Panels2_other_ymin, &
     133              :             s% pg% History_Panels2_other_ymax, &
     134              :             s% pg% History_Panels2_other_yaxis_reversed, &
     135              :             s% pg% History_Panels2_other_yaxis_log, &
     136              :             s% pg% History_Panels2_same_yaxis_range, &
     137              :             s% pg% History_Panels2_other_dymin, &
     138              :             s% pg% History_Panels2_points_name, &
     139              :             s% pg% History_Panels2_other_ymargin, &
     140              :             s% pg% History_Panels2_other_yaxis_name, &
     141              :             s% pg% History_Panels2_ymin, &
     142              :             s% pg% History_Panels2_ymax, &
     143              :             s% pg% History_Panels2_xaxis_reversed, &
     144              :             s% pg% History_Panels2_yaxis_reversed, &
     145              :             s% pg% History_Panels2_xaxis_log, &
     146              :             s% pg% History_Panels2_yaxis_log, &
     147              :             s% pg% History_Panels2_dymin, &
     148              :             s% pg% History_Panels2_ymargin, &
     149              :             s% pg% History_Panels2_yaxis_name, &
     150              :             s% pg% History_Panels2_use_decorator, &
     151              :             s% pg% History_Panels2_pgstar_decorator, &
     152            0 :             ierr)
     153            0 :       end subroutine do_History_Panels2_plot
     154              : 
     155              : 
     156            0 :       subroutine History_Panels3_plot(id, device_id, ierr)
     157              :          integer, intent(in) :: id, device_id
     158              :          integer, intent(out) :: ierr
     159              :          type (star_info), pointer :: s
     160              :          ierr = 0
     161            0 :          call get_star_ptr(id, s, ierr)
     162            0 :          if (ierr /= 0) return
     163            0 :          call pgslct(device_id)
     164            0 :          call pgbbuf()
     165            0 :          call pgeras()
     166              :          call do_History_Panels3_plot(s, id, device_id, &
     167              :             s% pg% History_Panels3_xleft, s% pg% History_Panels3_xright, &
     168              :             s% pg% History_Panels3_ybot, s% pg% History_Panels3_ytop, .false., &
     169            0 :             s% pg% History_Panels3_title, s% pg% History_Panels3_txt_scale, ierr)
     170            0 :          if (ierr /= 0) return
     171            0 :          call pgebuf()
     172              :       end subroutine History_Panels3_plot
     173              : 
     174              : 
     175            0 :       subroutine do_History_Panels3_plot(s, id, device_id, &
     176              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
     177              :          type (star_info), pointer :: s
     178              :          integer, intent(in) :: id, device_id
     179              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
     180              :          logical, intent(in) :: subplot
     181              :          character (len=*), intent(in) :: title
     182              :          integer, intent(out) :: ierr
     183              :          call do_history_panels_plot( &
     184              :             id, s, device_id, &
     185              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     186              :             s% pg% History_Panels3_xaxis_name, &
     187              :             s% pg% History_Panels3_automatic_star_age_units, &
     188              :             s% pg% History_Panels3_xmin, &
     189              :             s% pg% History_Panels3_xmax, &
     190              :             s% pg% History_Panels3_dxmin, &
     191              :             s% pg% History_Panels3_xmargin, &
     192              :             s% pg% History_Panels3_max_width, &
     193              :             s% pg% History_Panels3_num_panels, &
     194              :             s% pg% History_Panels3_other_ymin, &
     195              :             s% pg% History_Panels3_other_ymax, &
     196              :             s% pg% History_Panels3_other_yaxis_reversed, &
     197              :             s% pg% History_Panels3_other_yaxis_log, &
     198              :             s% pg% History_Panels3_same_yaxis_range, &
     199              :             s% pg% History_Panels3_other_dymin, &
     200              :             s% pg% History_Panels3_points_name, &
     201              :             s% pg% History_Panels3_other_ymargin, &
     202              :             s% pg% History_Panels3_other_yaxis_name, &
     203              :             s% pg% History_Panels3_ymin, &
     204              :             s% pg% History_Panels3_ymax, &
     205              :             s% pg% History_Panels3_xaxis_reversed, &
     206              :             s% pg% History_Panels3_yaxis_reversed, &
     207              :             s% pg% History_Panels3_xaxis_log, &
     208              :             s% pg% History_Panels3_yaxis_log, &
     209              :             s% pg% History_Panels3_dymin, &
     210              :             s% pg% History_Panels3_ymargin, &
     211              :             s% pg% History_Panels3_yaxis_name, &
     212              :             s% pg% History_Panels3_use_decorator, &
     213              :             s% pg% History_Panels3_pgstar_decorator, &
     214            0 :             ierr)
     215            0 :       end subroutine do_History_Panels3_plot
     216              : 
     217              : 
     218            0 :       subroutine History_Panels4_plot(id, device_id, ierr)
     219              :          integer, intent(in) :: id, device_id
     220              :          integer, intent(out) :: ierr
     221              :          type (star_info), pointer :: s
     222              :          ierr = 0
     223            0 :          call get_star_ptr(id, s, ierr)
     224            0 :          if (ierr /= 0) return
     225            0 :          call pgslct(device_id)
     226            0 :          call pgbbuf()
     227            0 :          call pgeras()
     228              :          call do_History_Panels4_plot(s, id, device_id, &
     229              :             s% pg% History_Panels4_xleft, s% pg% History_Panels4_xright, &
     230              :             s% pg% History_Panels4_ybot, s% pg% History_Panels4_ytop, .false., &
     231            0 :             s% pg% History_Panels4_title, s% pg% History_Panels4_txt_scale, ierr)
     232            0 :          if (ierr /= 0) return
     233            0 :          call pgebuf()
     234              :       end subroutine History_Panels4_plot
     235              : 
     236              : 
     237            0 :       subroutine do_History_Panels4_plot(s, id, device_id, &
     238              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
     239              :          type (star_info), pointer :: s
     240              :          integer, intent(in) :: id, device_id
     241              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
     242              :          logical, intent(in) :: subplot
     243              :          character (len=*), intent(in) :: title
     244              :          integer, intent(out) :: ierr
     245              :          call do_history_panels_plot( &
     246              :             id, s, device_id, &
     247              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     248              :             s% pg% History_Panels4_xaxis_name, &
     249              :             s% pg% History_Panels4_automatic_star_age_units, &
     250              :             s% pg% History_Panels4_xmin, &
     251              :             s% pg% History_Panels4_xmax, &
     252              :             s% pg% History_Panels4_dxmin, &
     253              :             s% pg% History_Panels4_xmargin, &
     254              :             s% pg% History_Panels4_max_width, &
     255              :             s% pg% History_Panels4_num_panels, &
     256              :             s% pg% History_Panels4_other_ymin, &
     257              :             s% pg% History_Panels4_other_ymax, &
     258              :             s% pg% History_Panels4_other_yaxis_reversed, &
     259              :             s% pg% History_Panels4_other_yaxis_log, &
     260              :             s% pg% History_Panels4_same_yaxis_range, &
     261              :             s% pg% History_Panels4_other_dymin, &
     262              :             s% pg% History_Panels4_points_name, &
     263              :             s% pg% History_Panels4_other_ymargin, &
     264              :             s% pg% History_Panels4_other_yaxis_name, &
     265              :             s% pg% History_Panels4_ymin, &
     266              :             s% pg% History_Panels4_ymax, &
     267              :             s% pg% History_Panels4_xaxis_reversed, &
     268              :             s% pg% History_Panels4_yaxis_reversed, &
     269              :             s% pg% History_Panels4_xaxis_log, &
     270              :             s% pg% History_Panels4_yaxis_log, &
     271              :             s% pg% History_Panels4_dymin, &
     272              :             s% pg% History_Panels4_ymargin, &
     273              :             s% pg% History_Panels4_yaxis_name, &
     274              :             s% pg% History_Panels4_use_decorator, &
     275              :             s% pg% History_Panels4_pgstar_decorator, &
     276            0 :             ierr)
     277            0 :       end subroutine do_History_Panels4_plot
     278              : 
     279              : 
     280            0 :       subroutine History_Panels5_plot(id, device_id, ierr)
     281              :          integer, intent(in) :: id, device_id
     282              :          integer, intent(out) :: ierr
     283              :          type (star_info), pointer :: s
     284              :          ierr = 0
     285            0 :          call get_star_ptr(id, s, ierr)
     286            0 :          if (ierr /= 0) return
     287            0 :          call pgslct(device_id)
     288            0 :          call pgbbuf()
     289            0 :          call pgeras()
     290              :          call do_History_Panels5_plot(s, id, device_id, &
     291              :             s% pg% History_Panels5_xleft, s% pg% History_Panels5_xright, &
     292              :             s% pg% History_Panels5_ybot, s% pg% History_Panels5_ytop, .false., &
     293            0 :             s% pg% History_Panels5_title, s% pg% History_Panels5_txt_scale, ierr)
     294            0 :          if (ierr /= 0) return
     295            0 :          call pgebuf()
     296              :       end subroutine History_Panels5_plot
     297              : 
     298              : 
     299            0 :       subroutine do_History_Panels5_plot(s, id, device_id, &
     300              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
     301              :          type (star_info), pointer :: s
     302              :          integer, intent(in) :: id, device_id
     303              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
     304              :          logical, intent(in) :: subplot
     305              :          character (len=*), intent(in) :: title
     306              :          integer, intent(out) :: ierr
     307              :          call do_history_panels_plot( &
     308              :             id, s, device_id, &
     309              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     310              :             s% pg% History_Panels5_xaxis_name, &
     311              :             s% pg% History_Panels5_automatic_star_age_units, &
     312              :             s% pg% History_Panels5_xmin, &
     313              :             s% pg% History_Panels5_xmax, &
     314              :             s% pg% History_Panels5_dxmin, &
     315              :             s% pg% History_Panels5_xmargin, &
     316              :             s% pg% History_Panels5_max_width, &
     317              :             s% pg% History_Panels5_num_panels, &
     318              :             s% pg% History_Panels5_other_ymin, &
     319              :             s% pg% History_Panels5_other_ymax, &
     320              :             s% pg% History_Panels5_other_yaxis_reversed, &
     321              :             s% pg% History_Panels5_other_yaxis_log, &
     322              :             s% pg% History_Panels5_same_yaxis_range, &
     323              :             s% pg% History_Panels5_other_dymin, &
     324              :             s% pg% History_Panels5_points_name, &
     325              :             s% pg% History_Panels5_other_ymargin, &
     326              :             s% pg% History_Panels5_other_yaxis_name, &
     327              :             s% pg% History_Panels5_ymin, &
     328              :             s% pg% History_Panels5_ymax, &
     329              :             s% pg% History_Panels5_xaxis_reversed, &
     330              :             s% pg% History_Panels5_yaxis_reversed, &
     331              :             s% pg% History_Panels5_xaxis_log, &
     332              :             s% pg% History_Panels5_yaxis_log, &
     333              :             s% pg% History_Panels5_dymin, &
     334              :             s% pg% History_Panels5_ymargin, &
     335              :             s% pg% History_Panels5_yaxis_name, &
     336              :             s% pg% History_Panels5_use_decorator, &
     337              :             s% pg% History_Panels5_pgstar_decorator, &
     338            0 :             ierr)
     339            0 :       end subroutine do_History_Panels5_plot
     340              : 
     341              : 
     342            0 :       subroutine History_Panels6_plot(id, device_id, ierr)
     343              :          integer, intent(in) :: id, device_id
     344              :          integer, intent(out) :: ierr
     345              :          type (star_info), pointer :: s
     346              :          ierr = 0
     347            0 :          call get_star_ptr(id, s, ierr)
     348            0 :          if (ierr /= 0) return
     349            0 :          call pgslct(device_id)
     350            0 :          call pgbbuf()
     351            0 :          call pgeras()
     352              :          call do_History_Panels6_plot(s, id, device_id, &
     353              :             s% pg% History_Panels6_xleft, s% pg% History_Panels6_xright, &
     354              :             s% pg% History_Panels6_ybot, s% pg% History_Panels6_ytop, .false., &
     355            0 :             s% pg% History_Panels6_title, s% pg% History_Panels6_txt_scale, ierr)
     356            0 :          if (ierr /= 0) return
     357            0 :          call pgebuf()
     358              :       end subroutine History_Panels6_plot
     359              : 
     360              : 
     361            0 :       subroutine do_History_Panels6_plot(s, id, device_id, &
     362              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
     363              :          type (star_info), pointer :: s
     364              :          integer, intent(in) :: id, device_id
     365              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
     366              :          logical, intent(in) :: subplot
     367              :          character (len=*), intent(in) :: title
     368              :          integer, intent(out) :: ierr
     369              :          call do_history_panels_plot( &
     370              :             id, s, device_id, &
     371              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     372              :             s% pg% History_Panels6_xaxis_name, &
     373              :             s% pg% History_Panels6_automatic_star_age_units, &
     374              :             s% pg% History_Panels6_xmin, &
     375              :             s% pg% History_Panels6_xmax, &
     376              :             s% pg% History_Panels6_dxmin, &
     377              :             s% pg% History_Panels6_xmargin, &
     378              :             s% pg% History_Panels6_max_width, &
     379              :             s% pg% History_Panels6_num_panels, &
     380              :             s% pg% History_Panels6_other_ymin, &
     381              :             s% pg% History_Panels6_other_ymax, &
     382              :             s% pg% History_Panels6_other_yaxis_reversed, &
     383              :             s% pg% History_Panels6_other_yaxis_log, &
     384              :             s% pg% History_Panels6_same_yaxis_range, &
     385              :             s% pg% History_Panels6_other_dymin, &
     386              :             s% pg% History_Panels6_points_name, &
     387              :             s% pg% History_Panels6_other_ymargin, &
     388              :             s% pg% History_Panels6_other_yaxis_name, &
     389              :             s% pg% History_Panels6_ymin, &
     390              :             s% pg% History_Panels6_ymax, &
     391              :             s% pg% History_Panels6_xaxis_reversed, &
     392              :             s% pg% History_Panels6_yaxis_reversed, &
     393              :             s% pg% History_Panels6_xaxis_log, &
     394              :             s% pg% History_Panels6_yaxis_log, &
     395              :             s% pg% History_Panels6_dymin, &
     396              :             s% pg% History_Panels6_ymargin, &
     397              :             s% pg% History_Panels6_yaxis_name, &
     398              :             s% pg% History_Panels6_use_decorator, &
     399              :             s% pg% History_Panels6_pgstar_decorator, &
     400            0 :             ierr)
     401            0 :       end subroutine do_History_Panels6_plot
     402              : 
     403              : 
     404            0 :       subroutine History_Panels7_plot(id, device_id, ierr)
     405              :          integer, intent(in) :: id, device_id
     406              :          integer, intent(out) :: ierr
     407              :          type (star_info), pointer :: s
     408              :          ierr = 0
     409            0 :          call get_star_ptr(id, s, ierr)
     410            0 :          if (ierr /= 0) return
     411            0 :          call pgslct(device_id)
     412            0 :          call pgbbuf()
     413            0 :          call pgeras()
     414              :          call do_History_Panels7_plot(s, id, device_id, &
     415              :             s% pg% History_Panels7_xleft, s% pg% History_Panels7_xright, &
     416              :             s% pg% History_Panels7_ybot, s% pg% History_Panels7_ytop, .false., &
     417            0 :             s% pg% History_Panels7_title, s% pg% History_Panels7_txt_scale, ierr)
     418            0 :          if (ierr /= 0) return
     419            0 :          call pgebuf()
     420              :       end subroutine History_Panels7_plot
     421              : 
     422              : 
     423            0 :       subroutine do_History_Panels7_plot(s, id, device_id, &
     424              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
     425              :          type (star_info), pointer :: s
     426              :          integer, intent(in) :: id, device_id
     427              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
     428              :          logical, intent(in) :: subplot
     429              :          character (len=*), intent(in) :: title
     430              :          integer, intent(out) :: ierr
     431              :          call do_history_panels_plot( &
     432              :             id, s, device_id, &
     433              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     434              :             s% pg% History_Panels7_xaxis_name, &
     435              :             s% pg% History_Panels7_automatic_star_age_units, &
     436              :             s% pg% History_Panels7_xmin, &
     437              :             s% pg% History_Panels7_xmax, &
     438              :             s% pg% History_Panels7_dxmin, &
     439              :             s% pg% History_Panels7_xmargin, &
     440              :             s% pg% History_Panels7_max_width, &
     441              :             s% pg% History_Panels7_num_panels, &
     442              :             s% pg% History_Panels7_other_ymin, &
     443              :             s% pg% History_Panels7_other_ymax, &
     444              :             s% pg% History_Panels7_other_yaxis_reversed, &
     445              :             s% pg% History_Panels7_other_yaxis_log, &
     446              :             s% pg% History_Panels7_same_yaxis_range, &
     447              :             s% pg% History_Panels7_other_dymin, &
     448              :             s% pg% History_Panels7_points_name, &
     449              :             s% pg% History_Panels7_other_ymargin, &
     450              :             s% pg% History_Panels7_other_yaxis_name, &
     451              :             s% pg% History_Panels7_ymin, &
     452              :             s% pg% History_Panels7_ymax, &
     453              :             s% pg% History_Panels7_xaxis_reversed, &
     454              :             s% pg% History_Panels7_yaxis_reversed, &
     455              :             s% pg% History_Panels7_xaxis_log, &
     456              :             s% pg% History_Panels7_yaxis_log, &
     457              :             s% pg% History_Panels7_dymin, &
     458              :             s% pg% History_Panels7_ymargin, &
     459              :             s% pg% History_Panels7_yaxis_name, &
     460              :             s% pg% History_Panels7_use_decorator, &
     461              :             s% pg% History_Panels7_pgstar_decorator, &
     462            0 :             ierr)
     463            0 :       end subroutine do_History_Panels7_plot
     464              : 
     465              : 
     466            0 :       subroutine History_Panels8_plot(id, device_id, ierr)
     467              :          integer, intent(in) :: id, device_id
     468              :          integer, intent(out) :: ierr
     469              :          type (star_info), pointer :: s
     470              :          ierr = 0
     471            0 :          call get_star_ptr(id, s, ierr)
     472            0 :          if (ierr /= 0) return
     473            0 :          call pgslct(device_id)
     474            0 :          call pgbbuf()
     475            0 :          call pgeras()
     476              :          call do_History_Panels8_plot(s, id, device_id, &
     477              :             s% pg% History_Panels8_xleft, s% pg% History_Panels8_xright, &
     478              :             s% pg% History_Panels8_ybot, s% pg% History_Panels8_ytop, .false., &
     479            0 :             s% pg% History_Panels8_title, s% pg% History_Panels8_txt_scale, ierr)
     480            0 :          if (ierr /= 0) return
     481            0 :          call pgebuf()
     482              :       end subroutine History_Panels8_plot
     483              : 
     484              : 
     485            0 :       subroutine do_History_Panels8_plot(s, id, device_id, &
     486              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
     487              :          type (star_info), pointer :: s
     488              :          integer, intent(in) :: id, device_id
     489              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
     490              :          logical, intent(in) :: subplot
     491              :          character (len=*), intent(in) :: title
     492              :          integer, intent(out) :: ierr
     493              :          call do_history_panels_plot( &
     494              :             id, s, device_id, &
     495              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     496              :             s% pg% History_Panels8_xaxis_name, &
     497              :             s% pg% History_Panels8_automatic_star_age_units, &
     498              :             s% pg% History_Panels8_xmin, &
     499              :             s% pg% History_Panels8_xmax, &
     500              :             s% pg% History_Panels8_dxmin, &
     501              :             s% pg% History_Panels8_xmargin, &
     502              :             s% pg% History_Panels8_max_width, &
     503              :             s% pg% History_Panels8_num_panels, &
     504              :             s% pg% History_Panels8_other_ymin, &
     505              :             s% pg% History_Panels8_other_ymax, &
     506              :             s% pg% History_Panels8_other_yaxis_reversed, &
     507              :             s% pg% History_Panels8_other_yaxis_log, &
     508              :             s% pg% History_Panels8_same_yaxis_range, &
     509              :             s% pg% History_Panels8_other_dymin, &
     510              :             s% pg% History_Panels8_points_name, &
     511              :             s% pg% History_Panels8_other_ymargin, &
     512              :             s% pg% History_Panels8_other_yaxis_name, &
     513              :             s% pg% History_Panels8_ymin, &
     514              :             s% pg% History_Panels8_ymax, &
     515              :             s% pg% History_Panels8_xaxis_reversed, &
     516              :             s% pg% History_Panels8_yaxis_reversed, &
     517              :             s% pg% History_Panels8_xaxis_log, &
     518              :             s% pg% History_Panels8_yaxis_log, &
     519              :             s% pg% History_Panels8_dymin, &
     520              :             s% pg% History_Panels8_ymargin, &
     521              :             s% pg% History_Panels8_yaxis_name, &
     522              :             s% pg% History_Panels8_use_decorator, &
     523              :             s% pg% History_Panels8_pgstar_decorator, &
     524            0 :             ierr)
     525            0 :       end subroutine do_History_Panels8_plot
     526              : 
     527              : 
     528            0 :       subroutine History_Panels9_plot(id, device_id, ierr)
     529              :          integer, intent(in) :: id, device_id
     530              :          integer, intent(out) :: ierr
     531              :          type (star_info), pointer :: s
     532              :          ierr = 0
     533            0 :          call get_star_ptr(id, s, ierr)
     534            0 :          if (ierr /= 0) return
     535            0 :          call pgslct(device_id)
     536            0 :          call pgbbuf()
     537            0 :          call pgeras()
     538              :          call do_History_Panels9_plot(s, id, device_id, &
     539              :             s% pg% History_Panels9_xleft, s% pg% History_Panels9_xright, &
     540              :             s% pg% History_Panels9_ybot, s% pg% History_Panels9_ytop, .false., &
     541            0 :             s% pg% History_Panels9_title, s% pg% History_Panels9_txt_scale, ierr)
     542            0 :          if (ierr /= 0) return
     543            0 :          call pgebuf()
     544              :       end subroutine History_Panels9_plot
     545              : 
     546              : 
     547            0 :       subroutine do_History_Panels9_plot(s, id, device_id, &
     548              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
     549              :          type (star_info), pointer :: s
     550              :          integer, intent(in) :: id, device_id
     551              :          real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
     552              :          logical, intent(in) :: subplot
     553              :          character (len=*), intent(in) :: title
     554              :          integer, intent(out) :: ierr
     555              :          call do_history_panels_plot( &
     556              :             id, s, device_id, &
     557              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     558              :             s% pg% History_Panels9_xaxis_name, &
     559              :             s% pg% History_Panels9_automatic_star_age_units, &
     560              :             s% pg% History_Panels9_xmin, &
     561              :             s% pg% History_Panels9_xmax, &
     562              :             s% pg% History_Panels9_dxmin, &
     563              :             s% pg% History_Panels9_xmargin, &
     564              :             s% pg% History_Panels9_max_width, &
     565              :             s% pg% History_Panels9_num_panels, &
     566              :             s% pg% History_Panels9_other_ymin, &
     567              :             s% pg% History_Panels9_other_ymax, &
     568              :             s% pg% History_Panels9_other_yaxis_reversed, &
     569              :             s% pg% History_Panels9_other_yaxis_log, &
     570              :             s% pg% History_Panels9_same_yaxis_range, &
     571              :             s% pg% History_Panels9_other_dymin, &
     572              :             s% pg% History_Panels9_points_name, &
     573              :             s% pg% History_Panels9_other_ymargin, &
     574              :             s% pg% History_Panels9_other_yaxis_name, &
     575              :             s% pg% History_Panels9_ymin, &
     576              :             s% pg% History_Panels9_ymax, &
     577              :             s% pg% History_Panels9_xaxis_reversed, &
     578              :             s% pg% History_Panels9_yaxis_reversed, &
     579              :             s% pg% History_Panels9_xaxis_log, &
     580              :             s% pg% History_Panels9_yaxis_log, &
     581              :             s% pg% History_Panels9_dymin, &
     582              :             s% pg% History_Panels9_ymargin, &
     583              :             s% pg% History_Panels9_yaxis_name, &
     584              :             s% pg% History_Panels9_use_decorator, &
     585              :             s% pg% History_Panels9_pgstar_decorator, &
     586            0 :             ierr)
     587            0 :       end subroutine do_History_Panels9_plot
     588              : 
     589              : 
     590            0 :       subroutine do_history_panels_plot( &
     591              :             id, s, device_id, &
     592              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
     593              :             hist_xaxis_name_in, automatic_star_age_units, hist_xmin_in, hist_xmax, dxmin, hist_xmargin, &
     594              :             hist_max_width, hist_num_panels, &
     595            0 :             hist_other_ymin, hist_other_ymax, &
     596            0 :             hist_other_yaxis_reversed, hist_other_yaxis_log, &
     597            0 :             hist_same_yaxis_range, &
     598            0 :             hist_other_dymin, hist_points_name, &
     599            0 :             hist_other_ymargin, hist_other_yaxis_name, &
     600            0 :             hist_ymin, hist_ymax, &
     601            0 :             hist_xaxis_reversed, hist_yaxis_reversed, &
     602            0 :             hist_xaxis_log,hist_yaxis_log, &
     603            0 :             hist_dymin, hist_ymargin, hist_yaxis_name, &
     604              :             use_decorator, pgstar_decorator, &
     605              :             ierr)
     606              :          use utils_lib
     607              :          use chem_def
     608              :          use net_def
     609              :          use net_lib, only: get_net_reaction_table
     610              :          use const_def, only: Msun, Rsun
     611              :          use pgstar_colors
     612              : 
     613              :          type (star_info), pointer :: s
     614              :          integer, intent(in) :: id, device_id, hist_num_panels
     615              :          logical, intent(in) :: subplot, automatic_star_age_units, hist_xaxis_reversed, hist_xaxis_log
     616              :          character (len=*), intent(in) :: title, hist_xaxis_name_in
     617              :          real, intent(in) :: &
     618              :             vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale, &
     619              :             hist_xmin_in, hist_xmax, hist_max_width, hist_xmargin, dxmin
     620              :          real, intent(in), dimension(:) :: &
     621              :             hist_other_ymin, hist_other_ymax, &
     622              :             hist_other_dymin, hist_other_ymargin, &
     623              :             hist_ymin, hist_ymax, hist_dymin, hist_ymargin
     624              :          logical, intent(in), dimension(:) :: &
     625              :             hist_other_yaxis_reversed, hist_other_yaxis_log, &
     626              :             hist_yaxis_reversed, hist_yaxis_log, hist_same_yaxis_range
     627              :          logical, intent(in) :: use_decorator
     628              :          character (len=*), intent(in), dimension(:) :: &
     629              :             hist_points_name, hist_other_yaxis_name, hist_yaxis_name
     630              :          integer, intent(out) :: ierr
     631              :          procedure(pgstar_decorator_interface), pointer :: pgstar_decorator
     632              : 
     633              :          character (len=strlen) :: yname, other_yname, hist_xaxis_name
     634            0 :          real, allocatable, dimension(:) :: xvec, yvec, other_yvec
     635            0 :          real, allocatable, dimension(:) :: yfile_xdata, other_yfile_xdata
     636            0 :          real, allocatable, dimension(:) :: yfile_ydata, other_yfile_ydata
     637              :          integer :: i, ii, n, j, k, max_width, step_min, step_max, &
     638              :             y_color, other_y_color, &
     639              :             yfile_data_len, other_yfile_data_len
     640            0 :          real :: hist_xmin, xleft, xright, &
     641            0 :             ymargin, panel_dy, panel_ytop, panel_ybot, &
     642            0 :             ybot, ytop, xpt, ypt, errpt, &
     643            0 :             other_ybot, other_ytop
     644              :          logical :: have_yaxis, have_other_yaxis
     645              : 
     646              :          integer :: ix, iounit, ishape, num_pts
     647              : 
     648              :          include 'formats'
     649              : 
     650            0 :          ierr = 0
     651              : 
     652            0 :          hist_xaxis_name = hist_xaxis_name_in
     653            0 :          hist_xmin = hist_xmin_in
     654              : 
     655            0 :          step_min = 1
     656            0 :          step_max = s% model_number
     657              : 
     658            0 :          if (hist_xaxis_name == 'model_number') then
     659            0 :             max_width = int(hist_max_width)
     660            0 :             step_min = int(hist_xmin)
     661            0 :             if (step_min <= 0) step_min = 1
     662            0 :             step_max = int(hist_xmax)
     663            0 :             if (step_max <= 0) step_max = s% model_number
     664            0 :             if (step_min >= s% model_number) step_min = 1
     665            0 :             if (max_width > 0) step_min = max(step_min, step_max - max_width)
     666            0 :          else if (hist_xaxis_name == 'star_age' .and. automatic_star_age_units) then
     667            0 :             if (s% star_age > 1d0) then
     668            0 :                hist_xaxis_name = 'star_age_yr'
     669            0 :             else if (s% star_age*secyer > secday) then
     670            0 :                hist_xaxis_name = 'star_age_day'
     671            0 :             else if (s% star_age*secyer > 60*60) then
     672            0 :                hist_xaxis_name = 'star_age_hr'
     673            0 :             else if (s% star_age*secyer > 60) then
     674            0 :                hist_xaxis_name = 'star_age_min'
     675              :             else
     676            0 :                hist_xaxis_name = 'star_age_sec'
     677              :             end if
     678              :          end if
     679              : 
     680            0 :          call integer_dict_lookup(s% history_names_dict, hist_xaxis_name, ix, ierr)
     681            0 :          if (ierr /= 0) ix = -1
     682            0 :          if (ix <= 0) then
     683            0 :             write(*,'(A)')
     684              :             write(*,*) 'ERROR: failed to find ' // &
     685            0 :                trim(hist_xaxis_name) // ' in history data'
     686            0 :             write(*,'(A)')
     687            0 :             ierr = -1
     688              :          end if
     689              : 
     690            0 :          n = count_hist_points(s, step_min, step_max)
     691            0 :          allocate(xvec(n), yvec(n), other_yvec(n), stat=ierr)
     692            0 :          if (ierr /= 0) then
     693            0 :             write(*,*) 'allocate failed for PGSTAR'
     694            0 :             return
     695              :          end if
     696              : 
     697            0 :          call get_hist_points(s, step_min, step_max, n, ix, xvec, ierr)
     698            0 :          if (ierr /= 0) then
     699            0 :             write(*,*) 'pgstar do_history_panels_plot get_hist_points failed ' // trim(hist_xaxis_name)
     700            0 :             ierr = 0
     701              :             !return
     702              :          end if
     703              : 
     704            0 :          if (hist_xaxis_log) then
     705            0 :             do k=1,n
     706            0 :                xvec(k) = log10(max(tiny(xvec(k)),abs(xvec(k))))
     707              :             end do
     708              :          end if
     709              : 
     710            0 :          if (hist_max_width > 0d0 .and. hist_xaxis_name /= 'model_number') then
     711            0 :             ii = n
     712            0 :             do i=ii,1,-1
     713            0 :                if (xvec(ii) - xvec(i) > hist_max_width) then
     714            0 :                   do j=i,ii
     715            0 :                      xvec(j-i+1) = xvec(j)
     716              :                   end do
     717            0 :                   n = n - i + 1
     718            0 :                   hist_xmin = xvec(n) - hist_max_width
     719            0 :                   exit
     720              :                end if
     721              :             end do
     722              :          end if
     723              : 
     724              :          call set_xleft_xright( &
     725              :             n, xvec, hist_xmin, hist_xmax, hist_xmargin, &
     726            0 :             hist_xaxis_reversed, dxmin, xleft, xright)
     727              : 
     728            0 :          call pgsave
     729            0 :          call pgsch(txt_scale)
     730              : 
     731            0 :          ymargin = 0.05
     732            0 :          y_color = clr_Goldenrod
     733            0 :          other_y_color = clr_LightSkyBlue
     734              : 
     735            0 :          panel_dy = (vp_ytop - vp_ybot)/real(hist_num_panels)
     736              : 
     737            0 :          do j = 1, hist_num_panels
     738              : 
     739            0 :             yfile_data_len = 0
     740            0 :             other_yfile_data_len = 0
     741              : 
     742            0 :             yname = hist_yaxis_name(j)
     743            0 :             if (len_trim(yname) == 0) then
     744              :                have_yaxis = .false.
     745              :             else
     746            0 :                have_yaxis = get1_yvec(yname, yvec)
     747            0 :                if (.not. have_yaxis) then
     748            0 :                   if (.not. read_values_from_file(yname, &
     749              :                         yfile_xdata, yfile_ydata, yfile_data_len)) then
     750              :                      write(*,*) &
     751            0 :                         'bad yaxis for History panels plot ' // trim(yname)
     752            0 :                      cycle
     753              :                   end if
     754              :                   have_yaxis = .true.
     755              :                end if
     756              :             end if
     757              : 
     758            0 :             other_yname = hist_other_yaxis_name(j)
     759            0 :             if (len_trim(hist_other_yaxis_name(j)) == 0) then
     760              :                have_other_yaxis = .false.
     761              :             else
     762            0 :                have_other_yaxis = get1_yvec(other_yname, other_yvec)
     763            0 :                if (.not. have_other_yaxis) then
     764            0 :                   if (.not. read_values_from_file(other_yname, &
     765              :                         other_yfile_xdata, other_yfile_ydata, other_yfile_data_len)) then
     766              :                      write(*,*) &
     767            0 :                         'bad other yaxis for History panels plot ' // trim(other_yname)
     768            0 :                      cycle
     769              :                   end if
     770              :                   have_other_yaxis = .true.
     771              :                end if
     772              :             end if
     773              : 
     774            0 :             if ((.not. have_yaxis) .and. (.not. have_other_yaxis)) cycle
     775              : 
     776            0 :             panel_ytop = vp_ytop - real(j-1)*panel_dy
     777            0 :             panel_ybot = panel_ytop - panel_dy
     778              : 
     779            0 :             call pgsvp(vp_xleft, vp_xright, panel_ybot, panel_ytop)
     780              : 
     781            0 :             if (j == 1) then
     782            0 :                if (.not. subplot) then
     783            0 :                   call show_model_number_pgstar(s)
     784            0 :                   call show_age_pgstar(s)
     785              :                end if
     786            0 :                call show_title_pgstar(s, title)
     787              :             end if
     788              : 
     789            0 :             if (have_other_yaxis) then
     790            0 :                if (other_yfile_data_len > 0) then
     791            0 :                   if (hist_other_yaxis_log(j)) then
     792            0 :                      do k=1,other_yfile_data_len
     793              :                         other_yfile_ydata(k) = &
     794            0 :                            log10(max(tiny(other_yfile_ydata(k)),abs(other_yfile_ydata(k))))
     795              :                      end do
     796              :                   end if
     797              :                   call set_ytop_ybot( &
     798              :                      other_yfile_data_len, other_yfile_ydata, &
     799              :                      hist_other_ymin(j), hist_other_ymax(j), -101.0, &
     800              :                      hist_other_ymargin(j), hist_other_yaxis_reversed(j), &
     801            0 :                      hist_other_dymin(j), other_ybot, other_ytop)
     802              :                else
     803            0 :                   if (hist_other_yaxis_log(j)) then
     804            0 :                      do k=1,n
     805            0 :                         other_yvec(k) = log10(max(tiny(other_yvec(k)),abs(other_yvec(k))))
     806              :                      end do
     807              :                   end if
     808              :                   call set_ytop_ybot( &
     809              :                      n, other_yvec, hist_other_ymin(j), hist_other_ymax(j), -101.0, &
     810              :                      hist_other_ymargin(j), hist_other_yaxis_reversed(j), &
     811            0 :                      hist_other_dymin(j), other_ybot, other_ytop)
     812              :                end if
     813              :             end if
     814              : 
     815            0 :             if (have_yaxis) then
     816            0 :                if (yfile_data_len > 0) then
     817            0 :                   if (hist_yaxis_log(j)) then
     818            0 :                      do k=1,yfile_data_len
     819            0 :                         yfile_ydata(k) = log10(max(tiny(yfile_ydata(k)),abs(yfile_ydata(k))))
     820              :                      end do
     821              :                   end if
     822              :                   call set_ytop_ybot( &
     823              :                      yfile_data_len, yfile_ydata, hist_ymin(j), hist_ymax(j), -101.0, &
     824              :                      hist_ymargin(j), hist_yaxis_reversed(j), &
     825            0 :                      hist_dymin(j), ybot, ytop)
     826              :                else
     827            0 :                   if (hist_yaxis_log(j)) then
     828            0 :                      do k=1,n
     829            0 :                         yvec(k) = log10(max(tiny(yvec(k)),abs(yvec(k))))
     830              :                      end do
     831              :                   end if
     832              :                   call set_ytop_ybot( &
     833              :                      n, yvec, hist_ymin(j), hist_ymax(j), -101.0, &
     834              :                      hist_ymargin(j), hist_yaxis_reversed(j), &
     835            0 :                      hist_dymin(j), ybot, ytop)
     836              :                end if
     837              :             end if
     838              : 
     839            0 :             if (have_yaxis .and. have_other_yaxis .and. hist_same_yaxis_range(j)) then
     840            0 :                if (other_ybot < ybot) ybot = other_ybot
     841            0 :                if (ybot < other_ybot) other_ybot = ybot
     842            0 :                if (other_ytop > ytop) ytop = other_ytop
     843            0 :                if (ytop > other_ytop) other_ytop = ytop
     844              :             end if
     845              : 
     846            0 :             if (have_other_yaxis) then
     847              :                !write(*,1) trim(other_yname), other_ybot, other_ytop
     848            0 :                call pgswin(xleft, xright, other_ybot, other_ytop)
     849            0 :                call pgscf(1)
     850            0 :                call pgsci(clr_Foreground)
     851            0 :                call show_box_pgstar(s,'','CMSTV')
     852            0 :                call pgsci(other_y_color)
     853            0 :                if (hist_other_yaxis_log(j)) then
     854            0 :                   call show_right_yaxis_label_pgstar(s,'log ' // other_yname)
     855              :                else
     856            0 :                   call show_right_yaxis_label_pgstar(s,other_yname)
     857              :                end if
     858            0 :                call pgslw(s% pg% pgstar_lw)
     859            0 :                if (other_yfile_data_len > 0) then
     860              :                   call pgline( &
     861            0 :                      other_yfile_data_len, other_yfile_xdata, other_yfile_ydata)
     862            0 :                   deallocate(other_yfile_xdata, other_yfile_ydata)
     863              :                else
     864            0 :                   call pgline(n, xvec, other_yvec)
     865              :                end if
     866            0 :                call pgslw(1)
     867              :             end if
     868              : 
     869            0 :             if (have_yaxis) then
     870              :                !write(*,1) trim(yname), ybot, ytop
     871            0 :                call pgswin(xleft, xright, ybot, ytop)
     872            0 :                call pgscf(1)
     873            0 :                call pgsci(clr_Foreground)
     874            0 :                if (j < hist_num_panels) then
     875            0 :                   if (.not. have_other_yaxis) then
     876            0 :                      call show_box_pgstar(s,'BCST1','BCMNSTV1')
     877              :                   else
     878            0 :                      call show_box_pgstar(s,'BCST','BNSTV')
     879              :                   end if
     880              :                else
     881            0 :                   if (.not. have_other_yaxis) then
     882            0 :                      call show_box_pgstar(s,'BCNST1','BCMNSTV1')
     883              :                   else
     884            0 :                      call show_box_pgstar(s,'BCNST','BNSTV')
     885              :                   end if
     886              :                end if
     887              : 
     888            0 :                if (len_trim(hist_points_name(j)) > 0) then
     889            0 :                   iounit = 33
     890              :                   open(unit=iounit, file=trim(hist_points_name(j)), &
     891            0 :                         status='old', action='read', iostat=ierr)
     892            0 :                   if (ierr /= 0) then
     893            0 :                      write(*, '(a)') 'failed to open ' // trim(hist_points_name(j))
     894            0 :                      return
     895              :                   end if
     896            0 :                   read(iounit,*) num_pts
     897            0 :                   ishape = s% pg% History_Panel_points_marker  ! 5
     898            0 :                   call pgsave
     899            0 :                   call pgsci(s% pg% History_Panel_points_ci)  !1)
     900            0 :                   call pgslw(s% pg% History_Panel_points_lw)  !2)
     901            0 :                   call pgsch(s% pg% History_Panel_points_ch)  !1.0)
     902            0 :                   do k = 1, num_pts
     903            0 :                      if (s% pg% History_Panel_points_error_bars) then
     904            0 :                         read(iounit,*) xpt, ypt, errpt
     905              :                      else
     906            0 :                         read(iounit,*) xpt, ypt
     907              :                      end if
     908            0 :                      if (mod(k-1,s% pg% History_Panel_points_interval) == 0) then
     909            0 :                         if (s% pg% History_Panel_points_error_bars) then
     910            0 :                            call pgmove(xpt, ypt+errpt)
     911            0 :                            call pgdraw(xpt, ypt-errpt)
     912              :                         else
     913            0 :                            call pgpt1(xpt, ypt, ishape)
     914              :                         end if
     915              :                      end if
     916              :                   end do
     917            0 :                   close(iounit)
     918            0 :                   call pgunsa
     919              :                end if
     920              : 
     921            0 :                call pgsci(y_color)
     922            0 :                if (hist_yaxis_log(j)) then
     923            0 :                   call show_left_yaxis_label_pgstar(s,'log ' // yname)
     924              :                else
     925            0 :                   call show_left_yaxis_label_pgstar(s,yname)
     926              :                end if
     927            0 :                call pgslw(s% pg% pgstar_lw)
     928            0 :                if (yfile_data_len > 0) then
     929            0 :                   call pgsls(s% pg% pgstar_history_line_style)
     930            0 :                   call pgline(yfile_data_len, yfile_xdata, yfile_ydata)
     931            0 :                   call pgsls(1)
     932            0 :                   deallocate(yfile_xdata, yfile_ydata)
     933              :                else
     934            0 :                   call pgsls(s% pg% pgstar_history_line_style)
     935            0 :                   call pgline(n, xvec, yvec)
     936            0 :                   call pgsls(1)
     937              :                end if
     938            0 :                call pgslw(1)
     939              :             end if
     940              : 
     941            0 :             call pgsci(clr_Foreground)
     942            0 :             call show_pgstar_decorator(s%id,use_decorator,pgstar_decorator, j, ierr)
     943              :          end do
     944              : 
     945            0 :          if (hist_xaxis_log) then
     946            0 :             call show_xaxis_label_pgstar(s,'log ' // hist_xaxis_name)
     947              :          else
     948            0 :             call show_xaxis_label_pgstar(s,hist_xaxis_name)
     949              :          end if
     950              : 
     951            0 :          deallocate(xvec, yvec, other_yvec)
     952              : 
     953            0 :          call pgunsa
     954              : 
     955              :          contains
     956              : 
     957              : 
     958            0 :          logical function get1_yvec(name, vec)
     959              :             character (len=*) :: name
     960              :             real, dimension(:), allocatable :: vec
     961            0 :             get1_yvec = get1_hist_yvec(s, step_min, step_max, n, name, vec)
     962            0 :          end function get1_yvec
     963              : 
     964              :       end subroutine do_history_panels_plot
     965              : 
     966              :       end module pgstar_history_panels
        

Generated by: LCOV version 2.0-1