Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions astero/private/pgstar_astero_plots.f90
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ subroutine do_echelle_plot( &

use utils_lib
use const_def, only: dp
use pgstar_colors

integer, intent(in) :: id, device_id
real, intent(in) :: xleft, xright, ybot, ytop, txt_scale
Expand Down Expand Up @@ -181,7 +182,7 @@ subroutine do_echelle_plot( &
call pgsvp(xleft, xright, ybot, ytop)
call pgswin(xmin, xmax, ymin, ymax)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
call pgstar_show_box(s,'BCNST1','BCNSTV1')
call pgstar_show_xaxis_label(s, &
"Frequency mod \(0530)\d\(0639)\u (\(0638)Hz) (duplicated at x+\(0530)\d\(0639)\u)")
Expand Down Expand Up @@ -223,23 +224,23 @@ subroutine do_echelle_plot( &
call pgsci(freq_color(0))
call pgsch(1.6*txt_scale)
call pgpt1(x_obs, y_obs, freq_shape(0))
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(txt_scale)
call pgptxt(x_obs, y_txt, 0.0, 0.5, 'l=0')

x_obs = x_obs+dx
call pgsci(freq_color(1))
call pgsch(1.6*txt_scale)
call pgpt1(x_obs, y_obs, freq_shape(1))
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(1.0*txt_scale)
call pgptxt(x_obs, y_txt, 0.0, 0.5, 'l=1')

x_obs = x_obs+dx
call pgsci(freq_color(2))
call pgsch(1.6*txt_scale)
call pgpt1(x_obs, y_obs, freq_shape(2))
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(1.0*txt_scale)
call pgptxt(x_obs, y_txt, 0.0, 0.5, 'l=2')

Expand All @@ -248,7 +249,7 @@ subroutine do_echelle_plot( &
call pgsci(freq_color(3))
call pgsch(1.6*txt_scale)
call pgpt1(x_obs, y_obs, freq_shape(3))
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(1.0*txt_scale)
call pgptxt(x_obs, y_txt, 0.0, 0.5, 'l=3')
end if
Expand Down Expand Up @@ -399,6 +400,7 @@ subroutine do_ratios_plot( &

use utils_lib
use const_def, only: dp
use pgstar_colors

integer, intent(in) :: id, device_id
real, intent(in) :: xleft, xright, ybot, ytop, txt_scale
Expand Down Expand Up @@ -473,7 +475,7 @@ subroutine do_ratios_plot( &
call pgsvp(xleft, xright, ybot, ytop)
call pgswin(xmin, xmax, ymin, ymax)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
call pgstar_show_box(s,'BCNST1','BCNSTV1')
call pgstar_show_xaxis_label(s,"Ratio")
call pgstar_show_left_yaxis_label(s,"Frequency (\(0638)Hz)")
Expand Down Expand Up @@ -506,23 +508,23 @@ subroutine do_ratios_plot( &
call pgsci(r01_color)
call pgsch(1.6*txt_scale)
call pgpt1(x_obs, y_obs, r01_shape)
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(1.0*txt_scale)
call pgptxt(x_obs, y_txt, 0.0, 0.5, 'r01')

x_obs = x_obs+dx
call pgsci(r10_color)
call pgsch(1.6*txt_scale)
call pgpt1(x_obs, y_obs, r10_shape)
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(1.0*txt_scale)
call pgptxt(x_obs, y_txt, 0.0, 0.5, 'r10')

x_obs = x_obs+dx
call pgsci(r02_color)
call pgsch(1.6*txt_scale)
call pgpt1(x_obs, y_obs, r02_shape)
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(1.0*txt_scale)
call pgptxt(x_obs, y_txt, 0.0, 0.5, 'r02')

Expand Down
3 changes: 2 additions & 1 deletion binary/private/pgbinary_hist_track.f90
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ subroutine do_Hist_Track(b, id, device_id, &

use utils_lib
use pgstar_support, only : set_xleft_xright, set_ytop_ybot
use pgstar_colors

type (binary_info), pointer :: b
integer, intent(in) :: &
Expand Down Expand Up @@ -721,7 +722,7 @@ end subroutine decorate
call pgsvp(vp_xleft, vp_xright, vp_ybot, vp_ytop)
call pgswin(xleft, xright, ybot, ytop)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
call show_box_pgbinary(b, 'BCNST1', 'BCNSTV1')

if (log_xaxis) then
Expand Down
7 changes: 4 additions & 3 deletions binary/private/pgbinary_history_panels.f90
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ subroutine do_history_panels_plot(&

use utils_lib
use pgstar_support, only : set_xleft_xright, set_ytop_ybot
use pgstar_colors

type (binary_info), pointer :: b
integer, intent(in) :: id, device_id, hist_num_panels
Expand Down Expand Up @@ -779,7 +780,7 @@ subroutine do_history_panels_plot(&
!write(*,1) trim(other_yname), other_ybot, other_ytop
call pgswin(xleft, xright, other_ybot, other_ytop)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
call show_box_pgbinary(b, '', 'CMSTV')
call pgsci(other_y_color)
if (hist_other_yaxis_log(j)) then
Expand Down Expand Up @@ -824,7 +825,7 @@ subroutine do_history_panels_plot(&
!write(*,1) trim(yname), ybot, ytop
call pgswin(xleft, xright, ybot, ytop)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
if (j < hist_num_panels) then
if (.not. have_other_yaxis) then
call show_box_pgbinary(b, 'BCST1', 'BCMNSTV1')
Expand Down Expand Up @@ -889,7 +890,7 @@ subroutine do_history_panels_plot(&
call pgslw(1)
end if

call pgsci(1)
call pgsci(clr_Foreground)
call show_pgbinary_decorator(b% binary_id, use_decorator, pgbinary_decorator, j, ierr)
end do

Expand Down
5 changes: 3 additions & 2 deletions binary/private/pgbinary_orbit.f90
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ subroutine orbit_panel(b, device_id, &
use num_lib, only : safe_root_with_guess
use math_lib, only : pow
use const_def, only : dp, pi
use pgstar_colors

type (binary_info), pointer :: b
integer, intent(in) :: device_id
Expand Down Expand Up @@ -214,7 +215,7 @@ subroutine orbit_panel(b, device_id, &
end if

call pgsave
call pgsci(1)
call pgsci(clr_Foreground)
call pgscf(1)
call pgsch(txt_scale)
call pgslw(b% pg% pgbinary_lw / 2)
Expand Down Expand Up @@ -246,7 +247,7 @@ subroutine orbit_panel(b, device_id, &
call pgslw(1)
call pgmtxt('T', -2.0 - 1.3, 0.05, 0.0, 'Star 2')

call pgsci(1)
call pgsci(clr_Foreground)
call pgpt1(0.0, 0.0, 5)
call pgunsa

Expand Down
3 changes: 2 additions & 1 deletion binary/private/pgbinary_summary.f90
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ subroutine Summary_plot(b, device_id, &
Text_Summary_name, ierr)

use utils_lib
use pgstar_colors, only: clr_Foreground
use pgstar_support, only : write_info_line_exp, write_info_line_flt, &
write_info_line_int

Expand All @@ -373,7 +374,7 @@ subroutine Summary_plot(b, device_id, &
call pgsch(txt_scale)

call pgsvp(winxmin, winxmax, winymin, winymax)
call pgsci(1)
call pgsci(clr_Foreground)
call pgscf(1)
call pgswin(0.0, 1.0, 0.0, 1.0)
call show_title_pgbinary(b, title)
Expand Down
7 changes: 4 additions & 3 deletions binary/private/pgbinary_summary_history.f90
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ subroutine do_summary_history_plot(b, id, device_id, &
use chem_def
use net_def
use const_def, only : Msun, Rsun
use pgstar_colors

type (binary_info), pointer :: b
integer, intent(in) :: id, device_id
Expand Down Expand Up @@ -169,7 +170,7 @@ subroutine plot(ierr)
ybot = 0
call pgswin(xmin, xmax, ymin + ybot, ymax)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
call show_box_pgbinary(b, 'BCNST', 'BCNSTV')
call show_left_yaxis_label_pgbinary(b, 'rel=(val-min)/(max-min)')

Expand Down Expand Up @@ -215,7 +216,7 @@ subroutine plot(ierr)

end do

call pgsci(1)
call pgsci(clr_Foreground)
call show_xaxis_label_pgbinary(b, 'model number')

! show the legend
Expand Down Expand Up @@ -277,7 +278,7 @@ integer function summary_history_line_legend(cnt, name)
call pgslw(lw)
call pgline(2, xpts, ypts)
call pgslw(lw_sav)
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(txt_scale * 0.70)
call pgptxt(xpts(2) + dx, ypos, 0.0, 0.0, name)
summary_history_line_legend = cnt + 1
Expand Down
13 changes: 5 additions & 8 deletions binary/private/pgbinary_support.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ module pgbinary_support
use const_def, only: dp, secyer
use rates_def, only : i_rate
use utils_lib
use pgstar_support, only : Set_Colours, do1_pgmtxt, &
clr_no_mixing, clr_convection, clr_leftover_convection, clr_semiconvection, &
clr_thermohaline, clr_overshoot, clr_rotation, clr_minimum, clr_rayleigh_taylor, &
clr_anonymous, colormap_offset, colormap_last, colormap_size, &
colormap, Line_Type_Solid, Line_Type_Dash, Line_Type_Dash_Dot, Line_Type_Dot_Dash, &
Line_Type_Dot ! inherit colors/linetypes + some routines from pgstar
use pgstar_support, only : do1_pgmtxt
use star_pgstar

implicit none
Expand Down Expand Up @@ -210,6 +205,7 @@ end subroutine write_plot_to_file


subroutine open_device(b, p, is_file, dev, id, ierr)
use pgstar_colors, only: set_device_colors
type (binary_info), pointer :: b
type (pgbinary_win_file_data), pointer :: p
logical, intent(in) :: is_file
Expand Down Expand Up @@ -245,7 +241,7 @@ subroutine open_device(b, p, is_file, dev, id, ierr)
p% prev_win_width = p% win_width
p% prev_win_aspect_ratio = p% win_aspect_ratio
end if
call Set_Colours(white_on_black_flag, ierr)
call set_device_colors(white_on_black_flag)
end subroutine open_device


Expand Down Expand Up @@ -416,9 +412,10 @@ end subroutine show_box_pgbinary


subroutine draw_rect()
use pgstar_colors, only: clr_Foreground
real, dimension(5) :: xs, ys
call pgsave
call pgsci(1)
call pgsci(clr_Foreground)
xs = [0.0, 0.0, 1.0, 1.0, 0.0]
ys = [0.0, 1.0, 1.0, 0.0, 0.0]
call pgswin(0.0, 1.0, 0.0, 1.0)
Expand Down
1 change: 1 addition & 0 deletions star/make/makefile_base
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ifeq ($(USE_PGSTAR),YES)
pgstar_decorator.f90 \
pgstar_ctrls_io.f90 \
pgstar_support.f90 \
pgstar_colors.f90 \
pgstar_hist_track.f90 \
pgstar_kipp.f90 \
pgstar_dpg_dnu.f90 \
Expand Down
1 change: 1 addition & 0 deletions star/other/pgstar_decorator.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ end subroutine null_pgstar_decorator
! subroutine Abundance_pgstar_decorator(id, xmin, xmax, ymin, ymax, plot_num, ierr)
! use star_def
! use const_def, only: dp
! use pgstar_colors
! integer, intent(in) :: id
! !Not dp
! real,intent(in) :: xmin, xmax, ymin, ymax
Expand Down
7 changes: 4 additions & 3 deletions star/other/sample_pgstar_plot.f90
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ subroutine do_my_plot(s, device_id, &
contains

subroutine plot(ierr)
use pgstar_colors
use rates_def, only: i_rate
use chem_def, only: ipp, icno
integer, intent(out) :: ierr
Expand Down Expand Up @@ -275,7 +276,7 @@ subroutine plot(ierr)
call pgmtxt('T', 1.8, 0.9, 0.5, str)

! xlabel
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(label_scale)
call show_pgstar_xaxis_by(s, my_xaxis_by, ierr)
if (ierr /= 0) return
Expand Down Expand Up @@ -318,7 +319,7 @@ subroutine plot(ierr)

call pgswin(xleft, xright, ymin, ymax)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(label_scale)
call pgbox('', 0.0, 0, 'BNSTV', 0.0, 0)

Expand Down Expand Up @@ -377,7 +378,7 @@ subroutine plot(ierr)
call pgswin(xleft, xright, ymin, ymax)

call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(label_scale)
call pgbox('BCNST', 0.0, 0, 'CMSTV', 0.0, 0)

Expand Down
7 changes: 4 additions & 3 deletions star/private/pgstar_abundance.f90
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ subroutine do_abundance_panel(s, id, device_id, &
use chem_def
use net_def
use const_def, only: Msun, Rsun
use pgstar_colors

type (star_info), pointer :: s
integer, intent(in) :: id, device_id
Expand Down Expand Up @@ -206,15 +207,15 @@ subroutine plot(ierr)
call show_age_pgstar(s)
end if
call show_title_pgstar(s, title)
call pgsci(1)
call pgsci(clr_Foreground)
call show_xaxis_name(s,xaxis_name,ierr)
if (ierr /= 0) return
end if

ybot = -0.05
call pgswin(xleft, xright, ymin+ybot, ymax)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
if (xaxis_numeric_labels_flag) then
call show_box_pgstar(s,'BCNST','BCNSTV')
else
Expand Down Expand Up @@ -397,7 +398,7 @@ integer function abundance_line_legend(cnt, str)
call pgslw(lw)
call pgline(2, xpts, ypts)
call pgslw(lw_sav)
call pgsci(1)
call pgsci(clr_Foreground)
call pgsch(txt_scale*s% pg% Abundance_legend_txt_scale_factor)
call pgptxt(xpts(2) + dx, ypos, 0.0, 0.0, trim(str))
abundance_line_legend = cnt + 1
Expand Down
7 changes: 4 additions & 3 deletions star/private/pgstar_color_magnitude.f90
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ subroutine do_Color_Magnitude_plot( &
ierr)
use utils_lib
use star_def
use pgstar_colors

type (star_info), pointer :: s
integer, intent(in) :: id, device_id, color_num_panels
Expand Down Expand Up @@ -814,7 +815,7 @@ subroutine do_Color_Magnitude_plot( &
color_other_dymin(j), other_ybot, other_ytop)
call pgswin(xleft, xright, other_ybot, other_ytop)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
call show_box_pgstar(s,'','CMSTV')
call pgsci(other_y_color)

Expand All @@ -836,7 +837,7 @@ subroutine do_Color_Magnitude_plot( &
color_dymin(j), ybot, ytop)
call pgswin(xleft, xright, ybot, ytop)
call pgscf(1)
call pgsci(1)
call pgsci(clr_Foreground)
if (j < color_num_panels) then
if (.not. have_other_yaxis) then
call show_box_pgstar(s,'BCST1','BCMNSTV1')
Expand All @@ -861,7 +862,7 @@ subroutine do_Color_Magnitude_plot( &
call pgslw(1)
end if

call pgsci(1)
call pgsci(clr_Foreground)

call show_pgstar_decorator(s%id,color_use_decorator,color_pgstar_decorator, j, ierr)

Expand Down
Loading