-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathpgstar_profile_panels.f90
1018 lines (917 loc) · 44.6 KB
/
pgstar_profile_panels.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
! ***********************************************************************
!
! Copyright (C) 2013-2019 The MESA Team
!
! MESA is free software; you can use it and/or modify
! it under the combined terms and restrictions of the MESA MANIFESTO
! and the GNU General Library Public License as published
! by the Free Software Foundation; either version 2 of the License,
! or (at your option) any later version.
!
! You should have received a copy of the MESA MANIFESTO along with
! this software; if not, it is available at the mesa website:
! http://mesa.sourceforge.net/
!
! MESA is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU Library General Public License for more details.
!
! You should have received a copy of the GNU Library General Public License
! along with this software; if not, write to the Free Software
! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
! ***********************************************************************
module pgstar_profile_panels
use star_private_def
use const_def
use pgstar_support
use pgstar_trho_profile
use star_pgstar
implicit none
contains
subroutine Profile_Panels1_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_profile_panels1_plot(s, id, device_id, &
s% pg% Profile_Panels1_xleft, s% pg% Profile_Panels1_xright, &
s% pg% Profile_Panels1_ybot, s% pg% Profile_Panels1_ytop, .false., &
s% pg% Profile_Panels1_title, s% pg% Profile_Panels1_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels1_plot
subroutine do_profile_panels1_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels1_xaxis_reversed, &
s% pg% Profile_Panels1_yaxis_reversed, &
s% pg% Profile_Panels1_other_yaxis_reversed, &
s% pg% Profile_Panels1_yaxis_log, &
s% pg% Profile_Panels1_other_yaxis_log, &
s% pg% Profile_Panels1_same_yaxis_range, &
s% pg% Profile_Panels1_xaxis_name, &
s% pg% Profile_Panels1_yaxis_name, &
s% pg% Profile_Panels1_other_yaxis_name, &
s% pg% Profile_Panels1_xmin, s% pg% Profile_Panels1_xmax, &
s% pg% Profile_Panels1_xmargin, s% pg% Profile_Panels1_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels1_ymin, s% pg% Profile_Panels1_other_ymin, &
s% pg% Profile_Panels1_ymax, s% pg% Profile_Panels1_other_ymax, &
s% pg% Profile_Panels1_ycenter, s% pg% Profile_Panels1_other_ycenter, &
s% pg% Profile_Panels1_ymargin, s% pg% Profile_Panels1_other_ymargin, &
s% pg% Profile_Panels1_dymin, s% pg% Profile_Panels1_other_dymin, &
s% pg% Profile_Panels1_show_grid, &
s% pg% Profile_Panels1_num_panels, &
s% pg% Profile_Panels1_use_decorator, &
s% pg% Profile_Panels1_pgstar_decorator, &
1, &
ierr)
end subroutine do_profile_panels1_plot
subroutine Profile_Panels2_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_profile_Panels2_plot(s, id, device_id, &
s% pg% Profile_Panels2_xleft, s% pg% Profile_Panels2_xright, &
s% pg% Profile_Panels2_ybot, s% pg% Profile_Panels2_ytop, .false., &
s% pg% Profile_Panels2_title, s% pg% Profile_Panels2_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels2_plot
subroutine do_profile_Panels2_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels2_xaxis_reversed, &
s% pg% Profile_Panels2_yaxis_reversed, &
s% pg% Profile_Panels2_other_yaxis_reversed, &
s% pg% Profile_Panels2_yaxis_log, &
s% pg% Profile_Panels2_other_yaxis_log, &
s% pg% Profile_Panels2_same_yaxis_range, &
s% pg% Profile_Panels2_xaxis_name, &
s% pg% Profile_Panels2_yaxis_name, &
s% pg% Profile_Panels2_other_yaxis_name, &
s% pg% Profile_Panels2_xmin, s% pg% Profile_Panels2_xmax, &
s% pg% Profile_Panels2_xmargin, s% pg% Profile_Panels2_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels2_ymin, s% pg% Profile_Panels2_other_ymin, &
s% pg% Profile_Panels2_ymax, s% pg% Profile_Panels2_other_ymax, &
s% pg% Profile_Panels2_ycenter, s% pg% Profile_Panels2_other_ycenter, &
s% pg% Profile_Panels2_ymargin, s% pg% Profile_Panels2_other_ymargin, &
s% pg% Profile_Panels2_dymin, s% pg% Profile_Panels2_other_dymin, &
s% pg% Profile_Panels2_show_grid, &
s% pg% Profile_Panels2_num_panels, &
s% pg% Profile_Panels2_use_decorator, &
s% pg% Profile_Panels2_pgstar_decorator, &
2, &
ierr)
end subroutine do_profile_Panels2_plot
subroutine Profile_Panels3_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_profile_Panels3_plot(s, id, device_id, &
s% pg% Profile_Panels3_xleft, s% pg% Profile_Panels3_xright, &
s% pg% Profile_Panels3_ybot, s% pg% Profile_Panels3_ytop, .false., &
s% pg% Profile_Panels3_title, s% pg% Profile_Panels3_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels3_plot
subroutine do_profile_Panels3_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels3_xaxis_reversed, &
s% pg% Profile_Panels3_yaxis_reversed, &
s% pg% Profile_Panels3_other_yaxis_reversed, &
s% pg% Profile_Panels3_yaxis_log, &
s% pg% Profile_Panels3_other_yaxis_log, &
s% pg% Profile_Panels3_same_yaxis_range, &
s% pg% Profile_Panels3_xaxis_name, &
s% pg% Profile_Panels3_yaxis_name, &
s% pg% Profile_Panels3_other_yaxis_name, &
s% pg% Profile_Panels3_xmin, s% pg% Profile_Panels3_xmax, &
s% pg% Profile_Panels3_xmargin, s% pg% Profile_Panels3_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels3_ymin, s% pg% Profile_Panels3_other_ymin, &
s% pg% Profile_Panels3_ymax, s% pg% Profile_Panels3_other_ymax, &
s% pg% Profile_Panels3_ycenter, s% pg% Profile_Panels3_other_ycenter, &
s% pg% Profile_Panels3_ymargin, s% pg% Profile_Panels3_other_ymargin, &
s% pg% Profile_Panels3_dymin, s% pg% Profile_Panels3_other_dymin, &
s% pg% Profile_Panels3_show_grid, &
s% pg% Profile_Panels3_num_panels, &
s% pg% Profile_Panels3_use_decorator, &
s% pg% Profile_Panels3_pgstar_decorator, &
3, &
ierr)
end subroutine do_profile_Panels3_plot
subroutine Profile_Panels4_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_profile_Panels4_plot(s, id, device_id, &
s% pg% Profile_Panels4_xleft, s% pg% Profile_Panels4_xright, &
s% pg% Profile_Panels4_ybot, s% pg% Profile_Panels4_ytop, .false., &
s% pg% Profile_Panels4_title, s% pg% Profile_Panels4_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels4_plot
subroutine do_Profile_Panels4_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels4_xaxis_reversed, &
s% pg% Profile_Panels4_yaxis_reversed, &
s% pg% Profile_Panels4_other_yaxis_reversed, &
s% pg% Profile_Panels4_yaxis_log, &
s% pg% Profile_Panels4_other_yaxis_log, &
s% pg% Profile_Panels4_same_yaxis_range, &
s% pg% Profile_Panels4_xaxis_name, &
s% pg% Profile_Panels4_yaxis_name, &
s% pg% Profile_Panels4_other_yaxis_name, &
s% pg% Profile_Panels4_xmin, s% pg% Profile_Panels4_xmax, &
s% pg% Profile_Panels4_xmargin, s% pg% Profile_Panels4_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels4_ymin, s% pg% Profile_Panels4_other_ymin, &
s% pg% Profile_Panels4_ymax, s% pg% Profile_Panels4_other_ymax, &
s% pg% Profile_Panels4_ycenter, s% pg% Profile_Panels4_other_ycenter, &
s% pg% Profile_Panels4_ymargin, s% pg% Profile_Panels4_other_ymargin, &
s% pg% Profile_Panels4_dymin, s% pg% Profile_Panels4_other_dymin, &
s% pg% Profile_Panels4_show_grid, &
s% pg% Profile_Panels4_num_panels, &
s% pg% Profile_Panels4_use_decorator, &
s% pg% Profile_Panels4_pgstar_decorator, &
4, &
ierr)
end subroutine do_profile_Panels4_plot
subroutine Profile_Panels5_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_Profile_Panels5_plot(s, id, device_id, &
s% pg% Profile_Panels5_xleft, s% pg% Profile_Panels5_xright, &
s% pg% Profile_Panels5_ybot, s% pg% Profile_Panels5_ytop, .false., &
s% pg% Profile_Panels5_title, s% pg% Profile_Panels5_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels5_plot
subroutine do_Profile_Panels5_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels5_xaxis_reversed, &
s% pg% Profile_Panels5_yaxis_reversed, &
s% pg% Profile_Panels5_other_yaxis_reversed, &
s% pg% Profile_Panels5_yaxis_log, &
s% pg% Profile_Panels5_other_yaxis_log, &
s% pg% Profile_Panels5_same_yaxis_range, &
s% pg% Profile_Panels5_xaxis_name, &
s% pg% Profile_Panels5_yaxis_name, &
s% pg% Profile_Panels5_other_yaxis_name, &
s% pg% Profile_Panels5_xmin, s% pg% Profile_Panels5_xmax, &
s% pg% Profile_Panels5_xmargin, s% pg% Profile_Panels5_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels5_ymin, s% pg% Profile_Panels5_other_ymin, &
s% pg% Profile_Panels5_ymax, s% pg% Profile_Panels5_other_ymax, &
s% pg% Profile_Panels5_ycenter, s% pg% Profile_Panels5_other_ycenter, &
s% pg% Profile_Panels5_ymargin, s% pg% Profile_Panels5_other_ymargin, &
s% pg% Profile_Panels5_dymin, s% pg% Profile_Panels5_other_dymin, &
s% pg% Profile_Panels5_show_grid, &
s% pg% Profile_Panels5_num_panels, &
s% pg% Profile_Panels5_use_decorator, &
s% pg% Profile_Panels5_pgstar_decorator, &
5, &
ierr)
end subroutine do_Profile_Panels5_plot
subroutine Profile_Panels6_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_Profile_Panels6_plot(s, id, device_id, &
s% pg% Profile_Panels6_xleft, s% pg% Profile_Panels6_xright, &
s% pg% Profile_Panels6_ybot, s% pg% Profile_Panels6_ytop, .false., &
s% pg% Profile_Panels6_title, s% pg% Profile_Panels6_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels6_plot
subroutine do_Profile_Panels6_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels6_xaxis_reversed, &
s% pg% Profile_Panels6_yaxis_reversed, &
s% pg% Profile_Panels6_other_yaxis_reversed, &
s% pg% Profile_Panels6_yaxis_log, &
s% pg% Profile_Panels6_other_yaxis_log, &
s% pg% Profile_Panels6_same_yaxis_range, &
s% pg% Profile_Panels6_xaxis_name, &
s% pg% Profile_Panels6_yaxis_name, &
s% pg% Profile_Panels6_other_yaxis_name, &
s% pg% Profile_Panels6_xmin, s% pg% Profile_Panels6_xmax, &
s% pg% Profile_Panels6_xmargin, s% pg% Profile_Panels6_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels6_ymin, s% pg% Profile_Panels6_other_ymin, &
s% pg% Profile_Panels6_ymax, s% pg% Profile_Panels6_other_ymax, &
s% pg% Profile_Panels6_ycenter, s% pg% Profile_Panels6_other_ycenter, &
s% pg% Profile_Panels6_ymargin, s% pg% Profile_Panels6_other_ymargin, &
s% pg% Profile_Panels6_dymin, s% pg% Profile_Panels6_other_dymin, &
s% pg% Profile_Panels6_show_grid, &
s% pg% Profile_Panels6_num_panels, &
s% pg% Profile_Panels6_use_decorator, &
s% pg% Profile_Panels6_pgstar_decorator, &
6, &
ierr)
end subroutine do_Profile_Panels6_plot
subroutine Profile_Panels7_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_Profile_Panels7_plot(s, id, device_id, &
s% pg% Profile_Panels7_xleft, s% pg% Profile_Panels7_xright, &
s% pg% Profile_Panels7_ybot, s% pg% Profile_Panels7_ytop, .false., &
s% pg% Profile_Panels7_title, s% pg% Profile_Panels7_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels7_plot
subroutine do_Profile_Panels7_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels7_xaxis_reversed, &
s% pg% Profile_Panels7_yaxis_reversed, &
s% pg% Profile_Panels7_other_yaxis_reversed, &
s% pg% Profile_Panels7_yaxis_log, &
s% pg% Profile_Panels7_other_yaxis_log, &
s% pg% Profile_Panels7_same_yaxis_range, &
s% pg% Profile_Panels7_xaxis_name, &
s% pg% Profile_Panels7_yaxis_name, &
s% pg% Profile_Panels7_other_yaxis_name, &
s% pg% Profile_Panels7_xmin, s% pg% Profile_Panels7_xmax, &
s% pg% Profile_Panels7_xmargin, s% pg% Profile_Panels7_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels7_ymin, s% pg% Profile_Panels7_other_ymin, &
s% pg% Profile_Panels7_ymax, s% pg% Profile_Panels7_other_ymax, &
s% pg% Profile_Panels7_ycenter, s% pg% Profile_Panels7_other_ycenter, &
s% pg% Profile_Panels7_ymargin, s% pg% Profile_Panels7_other_ymargin, &
s% pg% Profile_Panels7_dymin, s% pg% Profile_Panels7_other_dymin, &
s% pg% Profile_Panels7_show_grid, &
s% pg% Profile_Panels7_num_panels, &
s% pg% Profile_Panels7_use_decorator, &
s% pg% Profile_Panels7_pgstar_decorator, &
7, &
ierr)
end subroutine do_Profile_Panels7_plot
subroutine Profile_Panels8_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_Profile_Panels8_plot(s, id, device_id, &
s% pg% Profile_Panels8_xleft, s% pg% Profile_Panels8_xright, &
s% pg% Profile_Panels8_ybot, s% pg% Profile_Panels8_ytop, .false., &
s% pg% Profile_Panels8_title, s% pg% Profile_Panels8_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels8_plot
subroutine do_Profile_Panels8_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels8_xaxis_reversed, &
s% pg% Profile_Panels8_yaxis_reversed, &
s% pg% Profile_Panels8_other_yaxis_reversed, &
s% pg% Profile_Panels8_yaxis_log, &
s% pg% Profile_Panels8_other_yaxis_log, &
s% pg% Profile_Panels8_same_yaxis_range, &
s% pg% Profile_Panels8_xaxis_name, &
s% pg% Profile_Panels8_yaxis_name, &
s% pg% Profile_Panels8_other_yaxis_name, &
s% pg% Profile_Panels8_xmin, s% pg% Profile_Panels8_xmax, &
s% pg% Profile_Panels8_xmargin, s% pg% Profile_Panels8_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels8_ymin, s% pg% Profile_Panels8_other_ymin, &
s% pg% Profile_Panels8_ymax, s% pg% Profile_Panels8_other_ymax, &
s% pg% Profile_Panels8_ycenter, s% pg% Profile_Panels8_other_ycenter, &
s% pg% Profile_Panels8_ymargin, s% pg% Profile_Panels8_other_ymargin, &
s% pg% Profile_Panels8_dymin, s% pg% Profile_Panels8_other_dymin, &
s% pg% Profile_Panels8_show_grid, &
s% pg% Profile_Panels8_num_panels, &
s% pg% Profile_Panels8_use_decorator, &
s% pg% Profile_Panels8_pgstar_decorator, &
8, &
ierr)
end subroutine do_Profile_Panels8_plot
subroutine Profile_Panels9_plot(id, device_id, ierr)
integer, intent(in) :: id, device_id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call get_star_ptr(id, s, ierr)
if (ierr /= 0) return
call pgslct(device_id)
call pgbbuf()
call pgeras()
call do_Profile_Panels9_plot(s, id, device_id, &
s% pg% Profile_Panels9_xleft, s% pg% Profile_Panels9_xright, &
s% pg% Profile_Panels9_ybot, s% pg% Profile_Panels9_ytop, .false., &
s% pg% Profile_Panels9_title, s% pg% Profile_Panels9_txt_scale, ierr)
if (ierr /= 0) return
call pgebuf()
end subroutine Profile_Panels9_plot
subroutine do_Profile_Panels9_plot(s, id, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, ierr)
type (star_info), pointer :: s
integer, intent(in) :: id, device_id
real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
logical, intent(in) :: subplot
character (len=*), intent(in) :: title
integer, intent(out) :: ierr
call Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
s% pg% Profile_Panels9_xaxis_reversed, &
s% pg% Profile_Panels9_yaxis_reversed, &
s% pg% Profile_Panels9_other_yaxis_reversed, &
s% pg% Profile_Panels9_yaxis_log, &
s% pg% Profile_Panels9_other_yaxis_log, &
s% pg% Profile_Panels9_same_yaxis_range, &
s% pg% Profile_Panels9_xaxis_name, &
s% pg% Profile_Panels9_yaxis_name, &
s% pg% Profile_Panels9_other_yaxis_name, &
s% pg% Profile_Panels9_xmin, s% pg% Profile_Panels9_xmax, &
s% pg% Profile_Panels9_xmargin, s% pg% Profile_Panels9_show_mix_regions_on_xaxis, &
s% pg% Profile_Panels9_ymin, s% pg% Profile_Panels9_other_ymin, &
s% pg% Profile_Panels9_ymax, s% pg% Profile_Panels9_other_ymax, &
s% pg% Profile_Panels9_ycenter, s% pg% Profile_Panels9_other_ycenter, &
s% pg% Profile_Panels9_ymargin, s% pg% Profile_Panels9_other_ymargin, &
s% pg% Profile_Panels9_dymin, s% pg% Profile_Panels9_other_dymin, &
s% pg% Profile_Panels9_show_grid, &
s% pg% Profile_Panels9_num_panels, &
s% pg% Profile_Panels9_use_decorator, &
s% pg% Profile_Panels9_pgstar_decorator, &
9, &
ierr)
end subroutine do_Profile_Panels9_plot
subroutine Pro_panels_plot(s, device_id, &
vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
panels_xaxis_reversed, &
panels_yaxis_reversed, &
panels_other_yaxis_reversed, &
panels_yaxis_log, &
panels_other_yaxis_log, &
panels_same_yaxis_range, &
panels_xaxis_name, &
panels_yaxis_name, &
panels_other_yaxis_name, &
panels_xmin_in, panels_xmax_in, &
panels_xmargin_in, show_mix_regions, &
panels_ymin, panels_other_ymin, &
panels_ymax, panels_other_ymax, &
panels_ycenter, panels_other_ycenter, &
panels_ymargin, panels_other_ymargin, &
panels_dymin, panels_other_dymin, &
panels_show_grid, &
panels_num_panels, &
use_decorator, pgstar_decorator, &
panels_id, &
ierr)
use pgstar_abundance, only: do_abundance_panel
use pgstar_power, only: do_power_panel
use pgstar_dynamo, only: do_Dynamo_panel
use pgstar_mixing_Ds, only: do_Mixing_panel
use pgstar_mode_prop, only: do_mode_propagation_panel
use pgstar_summary_profile, only: do_summary_profile_panel
use utils_lib
use profile_getval, only: get_profile_val, get_profile_id
type (star_info), pointer :: s
integer, intent(in) :: &
device_id, panels_num_panels, panels_id
real, intent(in) :: &
vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale, &
panels_xmin_in, panels_xmax_in, panels_xmargin_in
logical, intent(in) :: subplot, show_mix_regions
logical, intent(in), dimension(:) :: &
panels_yaxis_log, &
panels_other_yaxis_log, &
panels_same_yaxis_range
real, intent(in), dimension(:) :: &
panels_ymin, panels_other_ymin, &
panels_ymax, panels_other_ymax, &
panels_ycenter, panels_other_ycenter, &
panels_ymargin, panels_other_ymargin, &
panels_dymin, panels_other_dymin
character (len=*), intent(in) :: &
title, panels_xaxis_name
character (len=*), intent(in), dimension(:) :: &
panels_yaxis_name, &
panels_other_yaxis_name
logical, intent(in) :: &
panels_xaxis_reversed, use_decorator
logical, intent(in), dimension(:) :: &
panels_yaxis_reversed, &
panels_other_yaxis_reversed
logical, intent(in) :: panels_show_grid
integer, intent(out) :: ierr
procedure(pgstar_decorator_interface), pointer :: pgstar_decorator
integer :: &
j, k, k0, k_max, i, nz, kmin, kmax, cnt, y_color, clr_sav, id, &
other_y_color, grid_min, grid_max, npts, yaxis_id, other_yaxis_id, ishape
real :: del, xpos, ypos, panel_dy, panel_ybot, panel_ytop, &
dx, dy, xpos0, dxpos, dypos, dxval, other_ytop, other_ybot, &
ybot, ytop, xmin, xmax, xleft, xright, xwidth, panels_xmargin, &
panels_xmin, panels_xmax, xwidth_left_frac, xwidth_right_frac, &
xwidth_left_of_shock, xwidth_right_of_shock, shock_xmin, shock_xmax, &
xshock_sp
real(dp) :: cs, x00, xp1, ms, photosphere_logxm, xshock
character (len=strlen) :: str, xname, yname, other_yname
logical :: found_shock
real, allocatable, dimension(:) :: xvec, yvec, other_yvec, unshifted_xvec
real, allocatable, dimension(:) :: yfile_xdata, other_yfile_xdata
real, allocatable, dimension(:) :: yfile_ydata, other_yfile_ydata
integer :: yfile_data_len, other_yfile_data_len, xaxis_id
include 'formats'
ierr = 0
id = s% id
call pgsave
call pgsch(txt_scale)
y_color = clr_Goldenrod
other_y_color = clr_LightSkyBlue
panel_dy = (vp_ytop - vp_ybot)/real(panels_num_panels)
nz = s% nz
allocate (xvec(nz), yvec(nz), other_yvec(nz), unshifted_xvec(nz))
panels_xmin = panels_xmin_in
panels_xmax = panels_xmax_in
panels_xmargin = panels_xmargin_in
xwidth_left_frac = s% pg% Profile_Panels_xwidth_left_div_shock_value
xwidth_right_frac = s% pg% Profile_Panels_xwidth_right_div_shock_value
xwidth_left_of_shock = s% pg% Profile_Panels_xwidth_left_of_shock
xwidth_right_of_shock = s% pg% Profile_Panels_xwidth_right_of_shock
xshock = 0
found_shock = .false.
xaxis_id = get_profile_id(s, panels_xaxis_name)
if (xaxis_id > 0 .and. s% v_center >= 0 .and. ( &
s% pg% Profile_Panels_show_Mach_1_location .or. &
xwidth_left_frac > 0 .or. xwidth_right_frac > 0 .or. &
xwidth_left_of_shock > 0 .or. xwidth_right_of_shock > 0)) then
found_shock = find_shock(s, xaxis_id, xshock)
if (found_shock .and. xshock <= 0) then
write(*,*) 'Panel:',panels_id,' shock location on xaxis must be positive for tracking location in plot.'
if (panels_xaxis_name == 'logR') write(*,*) 'perhaps use logR_cm instead of logR?'
write(*,'(A)')
found_shock = .false.
end if
end if
xshock_sp=real(xshock,kind=kind(xshock_sp))
if (found_shock .and. ( &
xwidth_left_frac > 0 .or. xwidth_right_frac > 0 .or. &
xwidth_left_of_shock > 0 .or. xwidth_right_of_shock > 0)) then
xmin = get_profile_val(s, xaxis_id, nz)
xmax = get_profile_val(s, xaxis_id, 1)
if (xmin > xmax) then ! switch
dx = xmin; xmin = xmax; xmax = dx
end if
shock_xmin = -HUGE(shock_xmin)
if (xwidth_left_frac > 0) &
shock_xmin = xshock*(1.0 - xwidth_left_frac)
if (xwidth_left_of_shock > 0) &
shock_xmin = max(shock_xmin, xshock_sp - xwidth_left_of_shock)
if (shock_xmin > xmin) then
panels_xmin = shock_xmin
panels_xmargin = 0
end if
shock_xmax = HUGE(shock_xmax)
if (xwidth_right_frac > 0) &
shock_xmax = xshock*(1.0 + xwidth_right_frac)
if (xwidth_right_of_shock > 0) &
shock_xmax = min(shock_xmax, xshock_sp + xwidth_right_of_shock)
if (shock_xmax < xmax) then
panels_xmax = shock_xmax
panels_xmargin = 0
end if
end if
call set_xaxis_bounds( &
s, panels_xaxis_name, panels_xmin, &
panels_xmax, panels_xaxis_reversed, panels_xmargin, &
xvec, xmin, xmax, xleft, xright, dx, &
grid_min, grid_max, npts, ierr)
if (ierr /= 0) then
write(*,*) 'Panel:',panels_id,' set_xaxis_bounds error in Profile panels -- please check ' // &
trim(panels_xaxis_name)
write(*,1) 'xleft', xleft
write(*,1) 'xright', xright
stop
return
end if
if (xleft == xright) return
if (found_shock .and. s% pg% Profile_Panels_show_Mach_1_location) then
! mark shock location
call pgsave
call pgsvp(vp_xleft, vp_xright, vp_ybot, vp_ytop)
call pgswin(0.0, 1.0, 0.0, 1.0)
call pgsci(clr_Gray)
call pgsls(Line_Type_Dash)
call pgslw(1)
dx = (xshock - xmin)/(xmax - xmin)
call pgmove(dx, 0.0)
call pgdraw(dx, 1.0)
call pgunsa
end if
if (s% pg% Profile_Panels_show_photosphere_location .and. &
(panels_xaxis_name == 'mass' .or. &
panels_xaxis_name == 'logxm' .or. &
panels_xaxis_name == 'radius' .or. &
panels_xaxis_name == 'radius_cm')) then
call pgsave
call pgsvp(vp_xleft, vp_xright, vp_ybot, vp_ytop)
call pgswin(0.0, 1.0, 0.0, 1.0)
call pgsci(clr_Gray)
call pgsls(Line_Type_Dash)
call pgslw(5)
if (panels_xaxis_name == 'radius') then
dx = (s% photosphere_r - xmin)/(xmax - xmin)
else if (panels_xaxis_name == 'radius_cm') then
dx = (s% photosphere_r*Rsun - xmin)/(xmax - xmin)
else if (panels_xaxis_name == 'mass') then
dx = (s% photosphere_m - xmin)/(xmax - xmin)
else
if (s% star_mass > s% photosphere_m) then
photosphere_logxm = log10(s% star_mass - s% photosphere_m)
else
photosphere_logxm = -99
end if
dx = 1 - (photosphere_logxm - xmin)/(xmax - xmin)
write(*,2) 'Panel:',panels_id,' photosphere_xm xmin photo_x xmax dx', s% model_number, &
s% star_mass - s% photosphere_m, &
xmin, photosphere_logxm, xmax, dx
end if
call pgmove(dx, 0.0)
call pgdraw(dx, 1.0)
call pgunsa
end if
do k=1,nz
unshifted_xvec(k) = xvec(k)
end do
if (grid_min > 1) then
do k=1,npts
xvec(k) = xvec(k+grid_min-1)
end do
end if
do j = 1, panels_num_panels
panel_ytop = vp_ytop - real(j-1)*panel_dy
panel_ybot = panel_ytop - panel_dy
call pgsvp(vp_xleft, vp_xright, panel_ybot, panel_ytop)
if (j == 1) then
if (.not. subplot) then
call show_model_number_pgstar(s)
call show_age_pgstar(s)
end if
call show_title_pgstar(s, title, 0.4)
end if
yname = panels_yaxis_name(j)
if (trim(yname) == 'Abundance') then
call do_abundance_panel(s, id, device_id, &
vp_xleft, vp_xright, panel_ybot, panel_ytop, .true., '', txt_scale, &
panels_xaxis_name, xmin, xmax, panels_xaxis_reversed, &
panels_ymin(j), panels_ymax(j), &
.true., (j == panels_num_panels), ierr)
if (ierr /= 0) then
write(*,*) 'Panel:',panels_id,' panels failed in do_abundance_panel'
stop
end if
cycle
else if (trim(yname) == 'Power') then
call do_power_panel(s, id, device_id, &
vp_xleft, vp_xright, panel_ybot, panel_ytop, .true., '', txt_scale, &
panels_xaxis_name, xmin, xmax, panels_xaxis_reversed, &
panels_ymin(j), panels_ymax(j), &
.true., (j == panels_num_panels), ierr)
if (ierr /= 0) then
write(*,*) 'Panel:',panels_id,' panels failed in do_power_panel'
stop
end if
cycle
else if (trim(yname) == 'Dynamo') then
call do_Dynamo_panel(s, id, device_id, &
vp_xleft, vp_xright, panel_ybot, panel_ytop, .true., '', txt_scale, &
panels_xaxis_name, xmin, xmax, panels_xaxis_reversed, &
.true., (j == panels_num_panels), ierr)
if (ierr /= 0) then
write(*,*) 'Panel:',panels_id,' panels failed in do_dynamo_panel'
stop
end if
cycle
else if (trim(yname) == 'Mixing') then
call do_Mixing_panel(s, id, device_id, &
vp_xleft, vp_xright, panel_ybot, panel_ytop, .true., '', txt_scale, &
panels_xaxis_name, xmin, xmax, panels_xaxis_reversed, &
panels_ymin(j), panels_ymax(j), &
.true., (j == panels_num_panels), ierr)
if (ierr /= 0) then
write(*,*) 'Panel:',panels_id,' panels failed in do_mixing_panel'
stop
end if
cycle
else if (trim(yname) == 'Mode_Prop') then
call do_mode_propagation_panel(s, id, device_id, &
vp_xleft, vp_xright, panel_ybot, panel_ytop, .true., '', txt_scale, &
panels_xaxis_name, xmin, xmax, panels_xaxis_reversed, &
.true., (j == panels_num_panels), ierr)
if (ierr /= 0) then
write(*,*) 'Panel:',panels_id,' panels failed in do_mode_propagation_panel'
stop
end if
cycle
else if (trim(yname) == 'Summary_Profile') then
call do_summary_profile_panel(s, id, device_id, &
vp_xleft, vp_xright, panel_ybot, panel_ytop, .true., '', txt_scale, &
panels_xaxis_name, xmin, xmax, panels_xaxis_reversed, &
.true., (j == panels_num_panels), ierr)
if (ierr /= 0) then
write(*,*) 'Panel:',panels_id,' panels failed in do_summary_profile_panel'
stop
end if
cycle
end if
other_yaxis_id = 0
yfile_data_len = 0
other_yfile_data_len = 0
if (len_trim(panels_other_yaxis_name(j)) > 0) then
other_yname = panels_other_yaxis_name(j)
other_yaxis_id = get_profile_id(s, other_yname)
if (other_yaxis_id <= 0) then
if (.not. read_values_from_file(other_yname, &
other_yfile_xdata, other_yfile_ydata, other_yfile_data_len)) then
write(*,'(A,1X,I1,A,1X,I1,A)') &
'Panel:',panels_id,' bad other yaxis(',j,') for Profile panels plot name=',trim(other_yname)
return
end if
if (panels_other_yaxis_log(j)) then
do k=1,other_yfile_data_len
other_yfile_ydata(k) = log10(max(tiny(other_yfile_ydata(k)),abs(other_yfile_ydata(k))))
end do
end if
call set_ytop_ybot( &
other_yfile_data_len, other_yfile_ydata, panels_other_ymin(j), &
panels_other_ymax(j), panels_other_ycenter(j), panels_other_ymargin(j), &
panels_other_yaxis_reversed(j), panels_other_dymin(j), other_ybot, other_ytop)
else
do k=1,npts
other_yvec(k) = get_profile_val(s, other_yaxis_id, k+grid_min-1)
end do
if (panels_other_yaxis_log(j)) then
do k=1,npts
other_yvec(k) = log10(max(tiny(other_yvec(k)),abs(other_yvec(k))))
end do
end if
call set_ytop_ybot( &
npts, other_yvec, panels_other_ymin(j), panels_other_ymax(j), panels_other_ycenter(j), &
panels_other_ymargin(j), panels_other_yaxis_reversed(j), &
panels_other_dymin(j), other_ybot, other_ytop)
end if
end if
yaxis_id = get_profile_id(s, yname)
if (yaxis_id <= 0) then
if (.not. read_values_from_file( &
yname, yfile_xdata, yfile_ydata, yfile_data_len)) then
write(*,'(A,1X,I1,A,1X,I1,A)') &
'Panel:',panels_id,' bad yaxis(',j,') for Profile panels plot name=',trim(yname)
return
end if
if (panels_yaxis_log(j)) then
do k=1,yfile_data_len
yfile_ydata(k) = log10(max(tiny(yfile_ydata(k)),abs(yfile_ydata(k))))
end do
end if
call set_ytop_ybot( &
yfile_data_len, yfile_xdata, panels_ymin(j), panels_ycenter(j), panels_ymax(j), &
panels_ymargin(j), panels_yaxis_reversed(j), panels_dymin(j), ybot, ytop)
else
do k=1,npts
yvec(k) = get_profile_val(s, yaxis_id, k+grid_min-1)
end do
if (panels_yaxis_log(j)) then
do k=1,npts
yvec(k) = log10(max(tiny(yvec(k)),abs(yvec(k))))
end do
end if
call set_ytop_ybot( &
npts, yvec, panels_ymin(j), panels_ymax(j), panels_ycenter(j), panels_ymargin(j), &
panels_yaxis_reversed(j), panels_dymin(j), ybot, ytop)
end if
if (panels_same_yaxis_range(j) .and. len_trim(panels_other_yaxis_name(j)) > 0) then
if (other_ybot < ybot) ybot = other_ybot
if (ybot < other_ybot) other_ybot = ybot
if (other_ytop > ytop) ytop = other_ytop
if (ytop > other_ytop) other_ytop = ytop
end if
if (len_trim(panels_other_yaxis_name(j)) > 0) then
call pgswin(xleft, xright, other_ybot, other_ytop)
call pgscf(1)
call pgsci(1)
call show_box_pgstar(s,'','CMSTV')
call pgsci(other_y_color)
if (panels_other_yaxis_log(j)) then
call show_right_yaxis_label_pgstar(s,'log ' // other_yname)
else
call show_right_yaxis_label_pgstar(s,other_yname)
end if
call pgslw(s% pg% pgstar_lw)
call pgsci(other_y_color)
if (other_yfile_data_len > 0) then
call pgline( &
other_yfile_data_len, other_yfile_xdata, other_yfile_ydata)
deallocate(other_yfile_xdata, other_yfile_ydata)
else
call pgline(npts, xvec, other_yvec)
if (panels_show_grid) then
ishape = 21
do k=1,npts
call pgpt1(xvec(k),other_yvec(k),ishape)
end do
end if
end if
call pgslw(1)
end if
call pgswin(xleft, xright, ybot, ytop)
call pgscf(1)
call pgsci(1)
if (j < panels_num_panels) then
if (other_yaxis_id <= 0 .and. other_yfile_data_len <= 0) then
call show_box_pgstar(s,'BCST','BCMNSTV')
else
call show_box_pgstar(s,'BCST','BNSTV')
end if
else
if (other_yaxis_id <= 0 .and. other_yfile_data_len <= 0) then
call show_box_pgstar(s,'BCNST','BCMNSTV')
else
call show_box_pgstar(s,'BCNST','BNSTV')
end if
end if
call pgqci(clr_sav)
call pgsci(y_color)
if (panels_yaxis_log(j)) then
call show_left_yaxis_label_pgstar(s,'log ' // yname)
else
call show_left_yaxis_label_pgstar(s,yname)
end if
call pgslw(s% pg% pgstar_lw)
if (yfile_data_len > 0) then
call pgsls(s% pg% pgstar_profile_line_style)
call pgline(yfile_data_len, yfile_xdata, yfile_ydata)
call pgsls(1)
deallocate(yfile_xdata, yfile_ydata)
else
call pgsls(s% pg% pgstar_profile_line_style)
call pgline(npts, xvec, yvec)
call pgsls(1)
if (panels_show_grid) then
ishape = 21
do k=1,npts
call pgpt1(xvec(k),yvec(k),ishape)
end do
end if
end if
call pgslw(1)
call pgsci(1)
call show_pgstar_decorator(s% id, use_decorator, pgstar_decorator, j, ierr)
end do
xname = trim(panels_xaxis_name)