fplot 1.7.1
A Fortran library providing a convenient interface for plotting with Gnuplot.
Loading...
Searching...
No Matches
fplot_core.f90
1! fplot_core.f90
2
15 use iso_fortran_env, only : real64, real32, int32
16 use iso_c_binding
17 use collections
18 use strings
19 use ferror
20 use forcolormap, cmap => colormap ! avoid conflict with the internally defined colormap type
21 implicit none
22 private
23 public :: plot_out_of_memory_error
24 public :: plot_invalid_input_error
25 public :: plot_invalid_operation_error
26 public :: plot_array_size_mismatch_error
27 public :: plot_gnuplot_file_error
28 public :: gnuplot_terminal_win32
29 public :: gnuplot_terminal_wxt
30 public :: gnuplot_terminal_qt
31 public :: gnuplot_terminal_png
32 public :: gnuplot_terminal_latex
33 public :: clr_black
34 public :: clr_white
35 public :: clr_red
36 public :: clr_lime
37 public :: clr_blue
38 public :: clr_yellow
39 public :: clr_cyan
40 public :: clr_magenta
41 public :: clr_silver
42 public :: clr_gray
43 public :: clr_maroon
44 public :: clr_olive
45 public :: clr_green
46 public :: clr_purple
47 public :: clr_teal
48 public :: clr_navy
49 public :: clr_orange
50 public :: marker_plus
51 public :: marker_x
52 public :: marker_asterisk
53 public :: marker_empty_square
54 public :: marker_filled_square
55 public :: marker_empty_circle
56 public :: marker_filled_circle
57 public :: marker_empty_triangle
58 public :: marker_filled_triangle
59 public :: marker_empty_nabla
60 public :: marker_filled_nabla
61 public :: marker_empty_rhombus
62 public :: marker_filled_rhombus
63 public :: line_solid
64 public :: line_dashed
65 public :: line_dotted
66 public :: line_dash_dotted
67 public :: line_dash_dot_dot
68 public :: legend_center
69 public :: legend_left
70 public :: legend_right
71 public :: legend_top
72 public :: legend_bottom
73 public :: legend_arrange_vertically
74 public :: legend_arrange_horizontally
75 public :: polar_theta_bottom
76 public :: polar_theta_left
77 public :: polar_theta_right
78 public :: polar_theta_top
79 public :: polar_theta_ccw
80 public :: polar_theta_cw
81 public :: plotdata_max_name_length
82 public :: coordinates_cartesian
83 public :: coordinates_spherical
84 public :: coordinates_cylindrical
85 public :: arrow_no_head
86 public :: arrow_head
87 public :: arrow_backhead
88 public :: arrow_heads
89 public :: arrow_filled
90 public :: arrow_empty
91 public :: arrow_no_fill
92 public :: arrow_no_border
93 public :: linspace
94 public :: logspace
95 public :: meshgrid
96 public :: color
97 public :: plot_data
98 public :: plot_axis
99 public :: terminal
100 public :: windows_terminal
101 public :: qt_terminal
102 public :: wxt_terminal
103 public :: png_terminal
104 public :: latex_terminal
105 public :: legend
106 public :: plot
107 public :: scatter_plot_data
108 public :: plot_data_2d
109 public :: plot_2d
110 public :: plot_data_3d
111 public :: plot_3d
112 public :: surface_plot_data
113 public :: surface_plot
114 public :: colormap
115 public :: rainbow_colormap
116 public :: hot_colormap
117 public :: cool_colormap
118 public :: plot_label
119 public :: multiplot
120 public :: plot_data_error_bars
121 public :: plot_data_colored
122 public :: plot_data_bar
123 public :: plot_data_histogram
124 public :: plot_bar
125 public :: plot_data_tri_2d
126 public :: delaunay_tri_surface
127 public :: delaunay_tri_2d
128 public :: tri_surface_plot_data
129 public :: vector_field_plot_data
130 public :: plot_polar
131 public :: filled_plot_data
132 public :: parula_colormap
133 public :: grey_colormap
134 public :: earth_colormap
135 public :: simplify_polyline
136 public :: plot_arrow
137 public :: custom_colormap
138 public :: cmap
139 public :: assignment(=)
140 public :: operator(==)
141 public :: operator(/=)
142
143! ******************************************************************************
144! ERROR CODES
145! ------------------------------------------------------------------------------
148 integer(int32), parameter :: plot_out_of_memory_error = 1000
150 integer(int32), parameter :: plot_invalid_input_error = 1001
152 integer(int32), parameter :: plot_invalid_operation_error = 1002
154 integer(int32), parameter :: plot_array_size_mismatch_error = 1003
156 integer(int32), parameter :: plot_gnuplot_file_error = 1004
157
158! ******************************************************************************
159! GNUPLOT TERMINAL CONSTANTS
160! ------------------------------------------------------------------------------
162 integer(int32), parameter :: gnuplot_terminal_win32 = 1
164 integer(int32), parameter :: gnuplot_terminal_wxt = 2
166 integer(int32), parameter :: gnuplot_terminal_qt = 3
168 integer(int32), parameter :: gnuplot_terminal_png = 4
170 integer(int32), parameter :: gnuplot_terminal_latex = 5
171
172! ******************************************************************************
173! MARKER CONSTANTS
174! ------------------------------------------------------------------------------
176 integer(int32), parameter :: marker_plus = 1
178 integer(int32), parameter :: marker_x = 2
180 integer(int32), parameter :: marker_asterisk = 3
182 integer(int32), parameter :: marker_empty_square = 4
184 integer(int32), parameter :: marker_filled_square = 5
186 integer(int32), parameter :: marker_empty_circle = 6
188 integer(int32), parameter :: marker_filled_circle = 7
190 integer(int32), parameter :: marker_empty_triangle = 8
192 integer(int32), parameter :: marker_filled_triangle = 9
194 integer(int32), parameter :: marker_empty_nabla = 10
196 integer(int32), parameter :: marker_filled_nabla = 11
198 integer(int32), parameter :: marker_empty_rhombus = 12
200 integer(int32), parameter :: marker_filled_rhombus = 13
201
202! ******************************************************************************
203! LINE CONSTANTS
204! ------------------------------------------------------------------------------
206 integer(int32), parameter :: line_solid = 1
208 integer(int32), parameter :: line_dashed = 2
210 integer(int32), parameter :: line_dotted = 3
212 integer(int32), parameter :: line_dash_dotted = 4
214 integer(int32), parameter :: line_dash_dot_dot = 5
215
216! ******************************************************************************
217! LEGEND CONSTANTS
218! ------------------------------------------------------------------------------
220 character(len = *), parameter :: legend_top = "top"
222 character(len = *), parameter :: legend_center = "center"
224 character(len = *), parameter :: legend_left = "left"
226 character(len = *), parameter :: legend_right = "right"
228 character(len = *), parameter :: legend_bottom = "bottom"
231 character(len = *), parameter :: legend_arrange_vertically = "vertical"
234 character(len = *), parameter :: legend_arrange_horizontally = "horizontal"
235
236! ******************************************************************************
237! POLAR PLOT CONSTANTS
238! ------------------------------------------------------------------------------
240 character(len = *), parameter :: polar_theta_top = "top"
242 character(len = *), parameter :: polar_theta_right = "right"
244 character(len = *), parameter :: polar_theta_bottom = "bottom"
246 character(len = *), parameter :: polar_theta_left = "left"
248 character(len = *), parameter :: polar_theta_ccw = "ccw"
250 character(len = *), parameter :: polar_theta_cw = "cw"
251
252! ******************************************************************************
253! COORDINATE SYSTEM CONSTANTS
254! ------------------------------------------------------------------------------
256 integer(int32), parameter :: coordinates_cartesian = 100
258 integer(int32), parameter :: coordinates_spherical = 101
260 integer(int32), parameter :: coordinates_cylindrical = 102
261
262! ******************************************************************************
263! PLOT DATA CONSTANTS
264! ------------------------------------------------------------------------------
266 integer(int32), parameter :: plotdata_max_name_length = 128
267
268! ******************************************************************************
269! PRIVATE/DEFAULT CONSTANTS
270! ------------------------------------------------------------------------------
272 integer(int32), parameter :: gnuplot_default_window_width = 640
274 integer(int32), parameter :: gnuplot_default_window_height = 420
276 integer(int32), parameter :: gnuplot_max_label_length = 128
278 character(len = *), parameter :: gnuplot_default_fontname = "Calibri"
280 integer(int32), parameter :: gnuplot_default_font_size = 14
282 integer(int32), parameter :: gnuplot_max_path_length = 256
283
284! ******************************************************************************
285! OPERATORS
286! ------------------------------------------------------------------------------
287 interface assignment(=)
288 module procedure :: clr_assign
289 module procedure :: lbl_assign
290 module procedure :: par_assign
291 end interface
292
293 interface operator(==)
294 module procedure :: clr_equals
295 end interface
296
297 interface operator(/=)
298 module procedure :: clr_not_equals
299 end interface
300
301! ******************************************************************************
302! BASE TYPES
303! ------------------------------------------------------------------------------
305 type, abstract :: plot_object
306 contains
309 procedure(get_string_result), deferred, public :: get_command_string
310 end type
311
312! ******************************************************************************
313! FPLOT_CORE_ROUTINES.F90
314! ------------------------------------------------------------------------------
315 interface
316
323 pure module function linspace(start, finish, npts) result(x)
324 real(real64), intent(in) :: start, finish
325 integer(int32), intent(in) :: npts
326 real(real64), allocatable, dimension(:) :: x
327 end function
328
336 pure module function logspace(start, finish, npts) result(x)
337 real(real64), intent(in) :: start, finish
338 integer(int32), intent(in) :: npts
339 real(real64), allocatable, dimension(:) :: x
340 end function
341
348 pure module function meshgrid(x, y) result(xy)
349 real(real64), intent(in), dimension(:) :: x, y
350 real(real64), allocatable, dimension(:,:,:) :: xy
351 end function
352 end interface
353
354! ******************************************************************************
355! FPLOT_COLORS.F90
356! ------------------------------------------------------------------------------
358 type color
360 integer(int32), public :: red = 0
362 integer(int32), public :: green = 0
364 integer(int32), public :: blue = 255
365 contains
375 procedure, public, pass :: to_hex_string => clr_to_hex_string
385 procedure, public, pass :: copy_from => clr_copy_from
386 end type
387
388! ------------------------------------------------------------------------------
389 interface
390 pure module function clr_to_hex_string(this) result(txt)
391 class(color), intent(in) :: this
392 character(6) :: txt
393 end function
394
395 pure module subroutine clr_copy_from(this, clr)
396 class(color), intent(inout) :: this
397 class(color), intent(in) :: clr
398 end subroutine
399
400 pure module subroutine clr_assign(x, y)
401 type(color), intent(out) :: x
402 class(color), intent(in) :: y
403 end subroutine
404
405 pure module function clr_equals(x, y) result(rst)
406 type(color), intent(in) :: x, y
407 logical :: rst
408 end function
409
410 pure module function clr_not_equals(x, y) result(rst)
411 type(color), intent(in) :: x, y
412 logical :: rst
413 end function
414 end interface
415
416! ------------------------------------------------------------------------------
418 type(color), parameter :: clr_black = color(0, 0, 0)
420 type(color), parameter :: clr_white = color(255, 255, 255)
422 type(color), parameter :: clr_red = color(255, 0, 0)
424 type(color), parameter :: clr_lime = color(0, 255, 0)
426 type(color), parameter :: clr_blue = color(0, 0, 255)
428 type(color), parameter :: clr_yellow = color(255, 255, 0)
430 type(color), parameter :: clr_cyan = color(0, 255, 255)
432 type(color), parameter :: clr_magenta = color(255, 0, 255)
434 type(color), parameter :: clr_silver = color(192, 192, 192)
436 type(color), parameter :: clr_gray = color(128, 128, 128)
438 type(color), parameter :: clr_maroon = color(128, 0, 0)
440 type(color), parameter :: clr_olive = color(128, 128, 0)
442 type(color), parameter :: clr_green = color(0, 128, 0)
444 type(color), parameter :: clr_purple = color(128, 0, 128)
446 type(color), parameter :: clr_teal = color(0, 128, 128)
448 type(color), parameter :: clr_navy = color(0, 0, 128)
450 type(color), parameter :: clr_orange = color(255, 165, 0)
451
452 ! A list of colors that can be cycled through by plotting code
453 type(color), parameter, dimension(7) :: color_list = [ &
454 color(0, int(0.447 * 255), int(0.741 * 255)), &
455 color(int(0.85 * 255), int(0.325 * 255), int(0.098 * 255)), &
456 color(int(0.929 * 255), int(0.694 * 255), int(0.125 * 255)), &
457 color(int(0.494 * 255), int(0.184 * 255), int(0.556 * 255)), &
458 color(int(0.466 * 255), int(0.674 * 255), int(0.188 * 255)), &
459 color(int(0.301 * 255), int(0.745 * 255), int(0.933 * 255)), &
460 color(int(0.635 * 255), int(0.078 * 255), int(0.184 * 255))]
461 ! type(color), parameter, dimension(8) :: color_list = [ &
462 ! CLR_BLUE, CLR_GREEN, CLR_RED, CLR_CYAN, CLR_LIME, CLR_PURPLE, &
463 ! CLR_ORANGE, CLR_BLACK]
464
465! ******************************************************************************
466! FPLOT_LABEL.F90
467! ------------------------------------------------------------------------------
469 type, extends(plot_object) :: plot_label
470 private
472 logical :: m_visible = .true.
474 real(real32), dimension(3) :: m_position
476 real(real32) :: m_angle = 0.0
478 character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_text
479 contains
489 procedure, public :: get_command_string => lbl_get_cmd
499 procedure, public :: get_is_visible => lbl_get_is_visible
509 procedure, public :: set_is_visible => lbl_set_is_visible
519 procedure, public :: get_position => lbl_get_position
530 procedure, public :: set_position => lbl_set_position
540 procedure, public :: get_angle => lbl_get_angle
550 procedure, public :: set_angle => lbl_set_angle
560 procedure, public :: get_text => lbl_get_txt
570 procedure, public :: set_text => lbl_set_txt
571 end type
572
573! ------------------------------------------------------------------------------
574 interface
575 module function lbl_get_cmd(this) result(x)
576 class(plot_label), intent(in) :: this
577 character(len = :), allocatable :: x
578 end function
579
580 pure module function lbl_get_is_visible(this) result(x)
581 class(plot_label), intent(in) :: this
582 logical :: x
583 end function
584
585 module subroutine lbl_set_is_visible(this, x)
586 class(plot_label), intent(inout) :: this
587 logical, intent(in) :: x
588 end subroutine
589
590 pure module function lbl_get_position(this) result(x)
591 class(plot_label), intent(in) :: this
592 real(real32), dimension(3) :: x
593 end function
594
595 module subroutine lbl_set_position(this, x)
596 class(plot_label), intent(inout) :: this
597 real(real32), intent(in), dimension(3) :: x
598 end subroutine
599
600 pure module function lbl_get_angle(this) result(x)
601 class(plot_label), intent(in) :: this
602 real(real32) :: x
603 end function
604
605 module subroutine lbl_set_angle(this, x)
606 class(plot_label), intent(inout) :: this
607 real(real32), intent(in) :: x
608 end subroutine
609
610 module function lbl_get_txt(this) result(x)
611 class(plot_label), intent(in) :: this
612 character(len = :), allocatable :: x
613 end function
614
615 module subroutine lbl_set_txt(this, x)
616 class(plot_label), intent(inout) :: this
617 character(len = *), intent(in) :: x
618 end subroutine
619
620 pure module subroutine lbl_assign(x, y)
621 type(plot_label), intent(out) :: x
622 class(plot_label), intent(in) :: y
623 end subroutine
624 end interface
625
626! ******************************************************************************
627! FPLOT_ARROW.F90
628! ------------------------------------------------------------------------------
630 integer(int32), parameter :: arrow_no_head = 0
632 integer(int32), parameter :: arrow_head = 1
634 integer(int32), parameter :: arrow_backhead = 2
636 integer(int32), parameter :: arrow_heads = 3
638 integer(int32), parameter :: arrow_filled = 100
640 integer(int32), parameter :: arrow_empty = 101
642 integer(int32), parameter :: arrow_no_fill = 102
644 integer(int32), parameter :: arrow_no_border = 103
645
646! ------------------------------------------------------------------------------
648 type, extends(plot_object) :: plot_arrow
649 ! Determines if the arrow is visible.
650 logical, private :: m_visible = .true.
651 ! The x, y, z coordinates of the tail
652 real(real32), dimension(3) :: m_tail = [0.0, 0.0, 0.0]
653 ! The x, y, z coordinates of the head
654 real(real32), dimension(3) :: m_head = [0.0, 0.0, 0.0]
655 ! The arrow color.
656 type(color) :: m_color = clr_black
657 ! The line style
658 integer(int32) :: m_linestyle = line_solid
659 ! The line width
660 real(real32) :: m_linewidth = 1.0
661 ! The head configuration
662 integer(int32) :: m_head_type = arrow_head
663 ! Arrow filling
664 integer(int32) :: m_filling = arrow_filled
665 ! Move to front?
666 logical :: m_front = .true.
667 ! Arrow head size
668 real(real32) :: m_size = 0.375
669 ! Arrow head angle
670 real(real32) :: m_angle = 10.0
671 ! Arrow head back angle
672 real(real32) :: m_backangle = 90.0
673 ! Use default head size
674 logical :: m_use_default_size = .true.
675 contains
685 procedure, public :: get_is_visible => par_get_is_visible
695 procedure, public :: set_is_visible => par_set_is_visible
706 procedure, public :: get_tail_location => par_get_tail
736 generic, public :: set_tail_location => par_set_tail_1, &
737 par_set_tail_2, par_set_tail_3
738 procedure, private :: par_set_tail_1
739 procedure, private :: par_set_tail_2
740 procedure, private :: par_set_tail_3
751 procedure, public :: get_head_location => par_get_head
781 generic, public :: set_head_location => par_set_head_1, &
782 par_set_head_2, par_set_head_3
783 procedure, private :: par_set_head_1
784 procedure, private :: par_set_head_2
785 procedure, private :: par_set_head_3
795 procedure, public :: get_color => par_get_color
805 procedure, public :: set_color => par_set_color
815 procedure, public :: get_line_style => par_get_line_style
831 procedure, public :: set_line_style => par_set_line_style
841 procedure, public :: get_line_width => par_get_line_width
851 procedure, public :: set_line_width => par_set_line_width
865 procedure, public :: get_head_type => par_get_head_type
880 procedure, public :: set_head_type => par_set_head_type
895 procedure, public :: get_head_fill => par_get_fill
910 procedure, public :: set_head_fill => par_set_fill
921 procedure, public :: get_move_to_front => par_get_move_to_front
933 procedure, public :: set_move_to_front => par_set_move_to_front
943 procedure, public :: get_head_size => par_get_head_size
953 procedure, public :: set_head_size => par_set_head_size
963 procedure, public :: get_head_angle => par_get_head_angle
973 procedure, public :: set_head_angle => par_set_head_angle
983 procedure, public :: get_head_back_angle => par_get_head_back_angle
993 procedure, public :: set_head_back_angle => par_set_head_back_angle
1004 procedure, public :: get_use_default_size => par_get_use_default_size
1015 procedure, public :: set_use_default_size => par_set_use_default_size
1026 procedure, public :: get_command_string => par_get_cmd
1027 end type
1028
1029! ------------------------------------------------------------------------------
1030 ! fplot_arrow.f90
1031 interface
1032 pure module function par_get_is_visible(this) result(rst)
1033 class(plot_arrow), intent(in) :: this
1034 logical :: rst
1035 end function
1036
1037 module subroutine par_set_is_visible(this, x)
1038 class(plot_arrow), intent(inout) :: this
1039 logical, intent(in) :: x
1040 end subroutine
1041
1042 pure module function par_get_tail(this) result(rst)
1043 class(plot_arrow), intent(in) :: this
1044 real(real32), dimension(3) :: rst
1045 end function
1046
1047 module subroutine par_set_tail_1(this, x)
1048 class(plot_arrow), intent(inout) :: this
1049 real(real32), intent(in) :: x(3)
1050 end subroutine
1051
1052 module subroutine par_set_tail_2(this, x, y)
1053 class(plot_arrow), intent(inout) :: this
1054 real(real32), intent(in) :: x, y
1055 end subroutine
1056
1057 module subroutine par_set_tail_3(this, x, y, z)
1058 class(plot_arrow), intent(inout) :: this
1059 real(real32), intent(in) :: x, y, z
1060 end subroutine
1061
1062 pure module function par_get_head(this) result(rst)
1063 class(plot_arrow), intent(in) :: this
1064 real(real32), dimension(3) :: rst
1065 end function
1066
1067 module subroutine par_set_head_1(this, x)
1068 class(plot_arrow), intent(inout) :: this
1069 real(real32), intent(in) :: x(3)
1070 end subroutine
1071
1072 module subroutine par_set_head_2(this, x, y)
1073 class(plot_arrow), intent(inout) :: this
1074 real(real32), intent(in) :: x, y
1075 end subroutine
1076
1077 module subroutine par_set_head_3(this, x, y, z)
1078 class(plot_arrow), intent(inout) :: this
1079 real(real32), intent(in) :: x, y, z
1080 end subroutine
1081
1082 pure module function par_get_color(this) result(rst)
1083 class(plot_arrow), intent(in) :: this
1084 type(color) :: rst
1085 end function
1086
1087 module subroutine par_set_color(this, x)
1088 class(plot_arrow), intent(inout) :: this
1089 type(color), intent(in) :: x
1090 end subroutine
1091
1092 pure module function par_get_line_style(this) result(rst)
1093 class(plot_arrow), intent(in) :: this
1094 integer(int32) :: rst
1095 end function
1096
1097 module subroutine par_set_line_style(this, x)
1098 class(plot_arrow), intent(inout) :: this
1099 integer(int32), intent(in) :: x
1100 end subroutine
1101
1102 pure module function par_get_line_width(this) result(rst)
1103 class(plot_arrow), intent(in) :: this
1104 real(real32) :: rst
1105 end function
1106
1107 module subroutine par_set_line_width(this, x)
1108 class(plot_arrow), intent(inout) :: this
1109 real(real32), intent(in) :: x
1110 end subroutine
1111
1112 pure module function par_get_head_type(this) result(rst)
1113 class(plot_arrow), intent(in) :: this
1114 integer(int32) :: rst
1115 end function
1116
1117 module subroutine par_set_head_type(this, x)
1118 class(plot_arrow), intent(inout) :: this
1119 integer(int32), intent(in) :: x
1120 end subroutine
1121
1122 module function par_get_cmd(this) result(rst)
1123 class(plot_arrow), intent(in) :: this
1124 character(len = :), allocatable :: rst
1125 end function
1126
1127 pure module function par_get_fill(this) result(rst)
1128 class(plot_arrow), intent(in) :: this
1129 integer(int32) :: rst
1130 end function
1131
1132 module subroutine par_set_fill(this, x)
1133 class(plot_arrow), intent(inout) :: this
1134 integer(int32), intent(in) :: x
1135 end subroutine
1136
1137 pure module function par_get_move_to_front(this) result(rst)
1138 class(plot_arrow), intent(in) :: this
1139 logical :: rst
1140 end function
1141
1142 module subroutine par_set_move_to_front(this, x)
1143 class(plot_arrow), intent(inout) :: this
1144 logical, intent(in) :: x
1145 end subroutine
1146
1147 pure module function par_get_head_size(this) result(rst)
1148 class(plot_arrow), intent(in) :: this
1149 real(real32) :: rst
1150 end function
1151
1152 module subroutine par_set_head_size(this, x)
1153 class(plot_arrow), intent(inout) :: this
1154 real(real32), intent(in) :: x
1155 end subroutine
1156
1157 pure module function par_get_head_angle(this) result(rst)
1158 class(plot_arrow), intent(in) :: this
1159 real(real32) :: rst
1160 end function
1161
1162 module subroutine par_set_head_angle(this, x)
1163 class(plot_arrow), intent(inout) :: this
1164 real(real32), intent(in) :: x
1165 end subroutine
1166
1167 pure module function par_get_head_back_angle(this) result(rst)
1168 class(plot_arrow), intent(in) :: this
1169 real(real32) :: rst
1170 end function
1171
1172 pure module function par_get_use_default_size(this) result(rst)
1173 class(plot_arrow), intent(in) :: this
1174 logical :: rst
1175 end function
1176
1177 module subroutine par_set_use_default_size(this, x)
1178 class(plot_arrow), intent(inout) :: this
1179 logical, intent(in) :: x
1180 end subroutine
1181
1182 module subroutine par_set_head_back_angle(this, x)
1183 class(plot_arrow), intent(inout) :: this
1184 real(real32), intent(in) :: x
1185 end subroutine
1186
1187 pure module subroutine par_assign(x, y)
1188 type(plot_arrow), intent(out) :: x
1189 class(plot_arrow), intent(in) :: y
1190 end subroutine
1191 end interface
1192
1193! ******************************************************************************
1194! FPLOT_TERMINAL.F90
1195! ------------------------------------------------------------------------------
1197 type, abstract, extends(plot_object) :: terminal
1198 private
1200 integer(int32) :: m_windowheight = gnuplot_default_window_height
1202 integer(int32) :: m_windowwidth = gnuplot_default_window_width
1204 integer(int32) :: m_termid = 0
1206 character(len = GNUPLOT_MAX_LABEL_LENGTH) :: m_title = ""
1208 logical :: m_hastitle = .false.
1210 character(len = GNUPLOT_MAX_LABEL_LENGTH) :: m_fontname = &
1211 gnuplot_default_fontname
1213 integer(int32) :: m_fontsize = gnuplot_default_font_size
1214 contains
1224 procedure, public :: get_window_width => term_get_window_width
1237 procedure, public :: set_window_width => term_set_window_width
1247 procedure, public :: get_window_height => term_get_window_height
1260 procedure, public :: set_window_height => term_set_window_height
1271 procedure, public :: get_command_string => term_get_command_string
1281 procedure, public :: get_plot_window_number => &
1282 term_get_plot_window_number
1292 procedure, public :: set_plot_window_number => &
1293 term_set_plot_window_number
1303 procedure, public :: get_title => term_get_title
1313 procedure, public :: set_title => term_set_title
1324 procedure, public :: get_font_name => term_get_font_name
1336 procedure, public :: set_font_name => term_set_font_name
1346 procedure, public :: get_font_size => term_get_font_size
1358 procedure, public :: set_font_size => term_set_font_size
1360 procedure(term_get_string_result), deferred, public :: get_id_string
1361 end type
1362
1363! ------------------------------------------------------------------------------
1364 interface
1365 pure module function term_get_window_width(this) result(x)
1366 class(terminal), intent(in) :: this
1367 integer :: x
1368 end function
1369
1370 module subroutine term_set_window_width(this, x)
1371 class(terminal), intent(inout) :: this
1372 integer, intent(in) :: x
1373 end subroutine
1374
1375 pure module function term_get_window_height(this) result(x)
1376 class(terminal), intent(in) :: this
1377 integer :: x
1378 end function
1379
1380 module subroutine term_set_window_height(this, x)
1381 class(terminal), intent(inout) :: this
1382 integer, intent(in) :: x
1383 end subroutine
1384
1385 pure module function term_get_plot_window_number(this) result(x)
1386 class(terminal), intent(in) :: this
1387 integer(int32) :: x
1388 end function
1389
1390 module subroutine term_set_plot_window_number(this, x)
1391 class(terminal), intent(inout) :: this
1392 integer(int32), intent(in) :: x
1393 end subroutine
1394
1395 module function term_get_title(this) result(str)
1396 class(terminal), intent(in) :: this
1397 character(len = :), allocatable :: str
1398 end function
1399
1400 module subroutine term_set_title(this, txt)
1401 class(terminal), intent(inout) :: this
1402 character(len = *), intent(in) :: txt
1403 end subroutine
1404
1405 module function term_get_font_name(this) result(name)
1406 class(terminal), intent(in) :: this
1407 character(len = :), allocatable :: name
1408 end function
1409
1410 module subroutine term_set_font_name(this, name)
1411 class(terminal), intent(inout) :: this
1412 character(len = *), intent(in) :: name
1413 end subroutine
1414
1415 pure module function term_get_font_size(this) result(sz)
1416 class(terminal), intent(in) :: this
1417 integer(int32) :: sz
1418 end function
1419
1420 module subroutine term_set_font_size(this, sz)
1421 class(terminal), intent(inout) :: this
1422 integer(int32), intent(in) :: sz
1423 end subroutine
1424
1425 module function term_get_command_string(this) result(x)
1426 class(terminal), intent(in) :: this
1427 character(len = :), allocatable :: x
1428 end function
1429 end interface
1430
1431! ******************************************************************************
1432! FPLOT_WINDOWS_TERMINAL.F90
1433! ------------------------------------------------------------------------------
1435 type, extends(terminal) :: windows_terminal
1436 private
1438 character(len = 3) :: m_id = "win"
1439 contains
1449 procedure, public :: get_id_string => wt_get_term_string
1450 end type
1451
1452! ------------------------------------------------------------------------------
1453 interface
1454 module function wt_get_term_string(this) result(x)
1455 class(windows_terminal), intent(in) :: this
1456 character(len = :), allocatable :: x
1457 end function
1458 end interface
1459
1460! ******************************************************************************
1461! FPLOT_QT_TERMINAL.F90
1462! ------------------------------------------------------------------------------
1464 type, extends(terminal) :: qt_terminal
1465 private
1467 character(len = 2) :: m_id = "qt"
1468 contains
1478 procedure, public :: get_id_string => qt_get_term_string
1479 end type
1480
1481! ------------------------------------------------------------------------------
1482 interface
1483 module function qt_get_term_string(this) result(x)
1484 class(qt_terminal), intent(in) :: this
1485 character(len = :), allocatable :: x
1486 end function
1487 end interface
1488
1489! ******************************************************************************
1490! FPLOT_WXT_TERMINAL.F90
1491! ------------------------------------------------------------------------------
1493 type, extends(terminal) :: wxt_terminal
1494 private
1496 character(len = 3) :: m_id = "wxt"
1497 contains
1507 procedure, public :: get_id_string => wxt_get_term_string
1508 end type
1509
1510! ------------------------------------------------------------------------------
1511 interface
1512 module function wxt_get_term_string(this) result(x)
1513 class(wxt_terminal), intent(in) :: this
1514 character(len = :), allocatable :: x
1515 end function
1516 end interface
1517
1518! ******************************************************************************
1519! FPLOT_PNG_TERMINAL.F90
1520! ------------------------------------------------------------------------------
1522 type, extends(terminal) :: png_terminal
1523 private
1525 character(len = 3) :: m_id = "png"
1527 character(len = GNUPLOT_MAX_PATH_LENGTH) :: m_fname = "default.png"
1528 contains
1538 procedure, public :: get_filename => png_get_filename
1548 procedure, public :: set_filename => png_set_filename
1558 procedure, public :: get_id_string => png_get_term_string
1569 procedure, public :: get_command_string => png_get_command_string
1570 end type
1571
1572! ------------------------------------------------------------------------------
1573 interface
1574 module function png_get_term_string(this) result(x)
1575 class(png_terminal), intent(in) :: this
1576 character(len = :), allocatable :: x
1577 end function
1578
1579 module function png_get_filename(this) result(txt)
1580 class(png_terminal), intent(in) :: this
1581 character(len = :), allocatable :: txt
1582 end function
1583
1584 module subroutine png_set_filename(this, txt)
1585 class(png_terminal), intent(inout) :: this
1586 character(len = *), intent(in) :: txt
1587 end subroutine
1588
1589 module function png_get_command_string(this) result(x)
1590 class(png_terminal), intent(in) :: this
1591 character(len = :), allocatable :: x
1592 end function
1593 end interface
1594
1595! ******************************************************************************
1596! FPLOT_LATEX.F90
1597! ------------------------------------------------------------------------------
1599 type, extends(terminal) :: latex_terminal
1600 private
1602 character(len = 14) :: m_id = "epslatex color"
1604 character(len = GNUPLOT_MAX_PATH_LENGTH) :: m_fname = "default.tex"
1605 contains
1615 procedure, public :: get_filename => tex_get_filename
1625 procedure, public :: set_filename => tex_set_filename
1635 procedure, public :: get_id_string => tex_get_term_string
1646 procedure, public :: get_command_string => tex_get_command_string
1647 end type
1648
1649! ------------------------------------------------------------------------------
1650 interface
1651 module function tex_get_term_string(this) result(x)
1652 class(latex_terminal), intent(in) :: this
1653 character(len = :), allocatable :: x
1654 end function
1655
1656 module function tex_get_filename(this) result(txt)
1657 class(latex_terminal), intent(in) :: this
1658 character(len = :), allocatable :: txt
1659 end function
1660
1661 module subroutine tex_set_filename(this, txt)
1662 class(latex_terminal), intent(inout) :: this
1663 character(len = *), intent(in) :: txt
1664 end subroutine
1665
1666 module function tex_get_command_string(this) result(x)
1667 class(latex_terminal), intent(in) :: this
1668 character(len = :), allocatable :: x
1669 end function
1670 end interface
1671
1672! ******************************************************************************
1673! FPLOT_PLOT_DATA.F90
1674! ------------------------------------------------------------------------------
1676 type, abstract, extends(plot_object) :: plot_data
1677 private
1679 character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_name = ""
1680 contains
1690 procedure, public :: get_name => pd_get_name
1700 procedure, public :: set_name => pd_set_name
1703 procedure(pd_get_string_result), deferred, public :: get_data_string
1704 end type
1705
1706! ------------------------------------------------------------------------------
1707 interface
1708 pure module function pd_get_name(this) result(txt)
1709 class(plot_data), intent(in) :: this
1710 character(len = :), allocatable :: txt
1711 end function
1712
1713 module subroutine pd_set_name(this, txt)
1714 class(plot_data), intent(inout) :: this
1715 character(len = *), intent(in) :: txt
1716 end subroutine
1717 end interface
1718
1719! ******************************************************************************
1720! FPLOT_PLOT_DATA_COLORED.F90
1721! ------------------------------------------------------------------------------
1723 type, abstract, extends(plot_data) :: plot_data_colored
1724 private
1726 type(color) :: m_color = clr_blue
1728 logical :: m_useautocolor = .true.
1730 integer(int32) :: m_colorindex = 1
1731 contains
1741 procedure, public :: get_line_color => pdc_get_line_color
1751 procedure, public :: set_line_color => pdc_set_line_color
1752 procedure, private :: get_color_index => pdc_get_color_index
1753 procedure, private :: set_color_index => pdc_set_color_index
1754 end type
1755
1756! ------------------------------------------------------------------------------
1757 interface
1758 pure module function pdc_get_line_color(this) result(x)
1759 class(plot_data_colored), intent(in) :: this
1760 type(color) :: x
1761 end function
1762
1763 module subroutine pdc_set_line_color(this, x)
1764 class(plot_data_colored), intent(inout) :: this
1765 type(color), intent(in) :: x
1766 end subroutine
1767
1768 pure module function pdc_get_color_index(this) result(x)
1769 class(plot_data_colored), intent(in) :: this
1770 integer(int32) :: x
1771 end function
1772
1773 module subroutine pdc_set_color_index(this, x)
1774 class(plot_data_colored), intent(inout) :: this
1775 integer(int32), intent(in) :: x
1776 end subroutine
1777 end interface
1778
1779! ******************************************************************************
1780! FPLOT_PLOT_AXIS.F90
1781! ------------------------------------------------------------------------------
1783 type, abstract, extends(plot_object) :: plot_axis
1784 private
1786 logical :: m_hastitle = .false.
1788 character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_title = ""
1790 logical :: m_autoscale = .true.
1792 real(real64), dimension(2) :: m_limits = [0.0d0, 1.0d0]
1794 logical :: m_logscale = .false.
1796 logical :: m_zeroaxis = .false.
1798 real(real32) :: m_axiswidth = 1.0
1799 ! ADDED March 29, 2023 - JAC
1801 logical :: m_defaultticlabels = .true.
1803 character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_ticlabelfmt = "%g"
1804 contains
1814 procedure, public :: get_title => pa_get_title
1826 procedure, public :: set_title => pa_set_title
1838 procedure, public :: is_title_defined => pa_has_title
1850 procedure, public :: get_autoscale => pa_get_autoscale
1862 procedure, public :: set_autoscale => pa_set_autoscale
1874 procedure, public :: get_limits => pa_get_axis_limits
1886 procedure, public :: set_limits => pa_set_axis_limits
1897 procedure, public :: get_is_log_scaled => pa_get_log_scale
1909 procedure, public :: set_is_log_scaled => pa_set_log_scale
1920 procedure, public :: get_command_string => pa_get_cmd_string
1931 procedure, public :: get_zero_axis => pa_get_zero_axis
1942 procedure, public :: set_zero_axis => pa_set_zero_axis
1953 procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width
1964 procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width
1966 procedure(pa_get_string_result), deferred, public :: get_id_string
1967
1979 procedure, public :: get_use_default_tic_label_format => &
1980 pa_get_use_dft_tic_lbl_fmt
1992 procedure, public :: set_use_default_tic_label_format => &
1993 pa_set_use_dft_tic_lbl_fmt
2004 procedure, public :: get_tic_label_format => pa_get_tic_label_fmt
2015 procedure, public :: set_tic_label_format => pa_set_tic_label_fmt
2016 end type
2017
2018! ------------------------------------------------------------------------------
2019 interface
2020 module function pa_get_title(this) result(txt)
2021 class(plot_axis), intent(in) :: this
2022 character(len = :), allocatable :: txt
2023 end function
2024
2025 module subroutine pa_set_title(this, txt)
2026 class(plot_axis), intent(inout) :: this
2027 character(len = *), intent(in) :: txt
2028 end subroutine
2029
2030 pure module function pa_has_title(this) result(x)
2031 class(plot_axis), intent(in) :: this
2032 logical :: x
2033 end function
2034
2035 pure module function pa_get_autoscale(this) result(x)
2036 class(plot_axis), intent(in) :: this
2037 logical :: x
2038 end function
2039
2040 module subroutine pa_set_autoscale(this, x)
2041 class(plot_axis), intent(inout) :: this
2042 logical, intent(in) :: x
2043 end subroutine
2044
2045 pure module function pa_get_axis_limits(this) result(x)
2046 class(plot_axis), intent(in) :: this
2047 real(real64), dimension(2) :: x
2048 end function
2049
2050 module subroutine pa_set_axis_limits(this, lower, upper)
2051 class(plot_axis), intent(inout) :: this
2052 real(real64), intent(in) :: lower, upper
2053 end subroutine
2054
2055 pure module function pa_get_log_scale(this) result(x)
2056 class(plot_axis), intent(in) :: this
2057 logical :: x
2058 end function
2059
2060 module subroutine pa_set_log_scale(this, x)
2061 class(plot_axis), intent(inout) :: this
2062 logical, intent(in) :: x
2063 end subroutine
2064
2065 module function pa_get_cmd_string(this) result(txt)
2066 class(plot_axis), intent(in) :: this
2067 character(len = :), allocatable :: txt
2068 end function
2069
2070 pure module function pa_get_zero_axis(this) result(x)
2071 class(plot_axis), intent(in) :: this
2072 logical :: x
2073 end function
2074
2075 module subroutine pa_set_zero_axis(this, x)
2076 class(plot_axis), intent(inout) :: this
2077 logical, intent(in) :: x
2078 end subroutine
2079
2080 pure module function pa_get_zero_axis_width(this) result(x)
2081 class(plot_axis), intent(in) :: this
2082 real(real32) :: x
2083 end function
2084
2085 module subroutine pa_set_zero_axis_width(this, x)
2086 class(plot_axis), intent(inout) :: this
2087 real(real32), intent(in) :: x
2088 end subroutine
2089
2090 pure module function pa_get_use_dft_tic_lbl_fmt(this) result(rst)
2091 class(plot_axis), intent(in) :: this
2092 logical :: rst
2093 end function
2094
2095 module subroutine pa_set_use_dft_tic_lbl_fmt(this, x)
2096 class(plot_axis), intent(inout) :: this
2097 logical, intent(in) :: x
2098 end subroutine
2099
2100 pure module function pa_get_tic_label_fmt(this) result(rst)
2101 class(plot_axis), intent(in) :: this
2102 character(len = :), allocatable :: rst
2103 end function
2104
2105 module subroutine pa_set_tic_label_fmt(this, x)
2106 class(plot_axis), intent(inout) :: this
2107 character(len = *), intent(in) :: x
2108 end subroutine
2109 end interface
2110
2111! ******************************************************************************
2112! FPLOT_LEGEND.F90
2113! ------------------------------------------------------------------------------
2115 type, extends(plot_object) :: legend
2116 private
2118 logical :: m_inside = .true.
2120 logical :: m_box = .true.
2122 character(len = 20) :: m_horzposition = legend_right
2124 character(len = 20) :: m_vertposition = legend_top
2126 logical :: m_show = .false.
2128 character(len = 20) :: m_layout = legend_arrange_vertically
2130 logical :: m_opaque = .true.
2131 contains
2142 procedure, public :: get_draw_inside_axes => leg_get_inside
2153 procedure, public :: set_draw_inside_axes => leg_set_inside
2163 procedure, public :: get_draw_border => leg_get_box
2173 procedure, public :: set_draw_border => leg_set_box
2184 procedure, public :: get_horizontal_position => leg_get_horz_pos
2196 procedure, public :: set_horizontal_position => leg_set_horz_pos
2207 procedure, public :: get_vertical_position => leg_get_vert_pos
2219 procedure, public :: set_vertical_position => leg_set_vert_pos
2229 procedure, public :: get_is_visible => leg_get_visible
2239 procedure, public :: set_is_visible => leg_set_visible
2249 procedure, public :: get_command_string => leg_get_command_txt
2260 procedure, public :: get_layout => leg_get_layout
2271 procedure, public :: set_layout => leg_set_layout
2281 procedure, public :: get_is_opaque => leg_get_opaque
2291 procedure, public :: set_is_opaque => leg_set_opaque
2292 end type
2293
2294! ------------------------------------------------------------------------------
2295 interface
2296 pure module function leg_get_inside(this) result(x)
2297 class(legend), intent(in) :: this
2298 logical :: x
2299 end function
2300
2301 module subroutine leg_set_inside(this, x)
2302 class(legend), intent(inout) :: this
2303 logical, intent(in) :: x
2304 end subroutine
2305
2306 pure module function leg_get_box(this) result(x)
2307 class(legend), intent(in) :: this
2308 logical :: x
2309 end function
2310
2311 module subroutine leg_set_box(this, x)
2312 class(legend), intent(inout) :: this
2313 logical, intent(in) :: x
2314 end subroutine
2315
2316 module function leg_get_horz_pos(this) result(x)
2317 class(legend), intent(in) :: this
2318 character(len = :), allocatable :: x
2319 end function
2320
2321 module subroutine leg_set_horz_pos(this, x)
2322 class(legend), intent(inout) :: this
2323 character(len = *), intent(in) :: x
2324 end subroutine
2325
2326 module function leg_get_vert_pos(this) result(x)
2327 class(legend), intent(in) :: this
2328 character(len = :), allocatable :: x
2329 end function
2330
2331 module subroutine leg_set_vert_pos(this, x)
2332 class(legend), intent(inout) :: this
2333 character(len = *), intent(in) :: x
2334 end subroutine
2335
2336 pure module function leg_get_visible(this) result(x)
2337 class(legend), intent(in) :: this
2338 logical :: x
2339 end function
2340
2341 module subroutine leg_set_visible(this, x)
2342 class(legend), intent(inout) :: this
2343 logical, intent(in) :: x
2344 end subroutine
2345
2346 module function leg_get_command_txt(this) result(txt)
2347 class(legend), intent(in) :: this
2348 character(len = :), allocatable :: txt
2349 end function
2350
2351 pure module function leg_get_layout(this) result(rst)
2352 class(legend), intent(in) :: this
2353 character(len = :), allocatable :: rst
2354 end function
2355
2356 module subroutine leg_set_layout(this, x)
2357 class(legend), intent(inout) :: this
2358 character(len = *), intent(in) :: x
2359 end subroutine
2360
2361 pure module function leg_get_opaque(this) result(rst)
2362 class(legend), intent(in) :: this
2363 logical :: rst
2364 end function
2365
2366 module subroutine leg_set_opaque(this, x)
2367 class(legend), intent(inout) :: this
2368 logical :: x
2369 end subroutine
2370 end interface
2371
2372
2373! ******************************************************************************
2374! FPLOT_COLORMAP.F90
2375! ------------------------------------------------------------------------------
2377 type, abstract, extends(plot_object) :: colormap
2378 private
2380 character(len = :), allocatable :: m_label
2382 logical :: m_horizontal = .false.
2384 logical :: m_drawborder = .true.
2386 logical :: m_showtics = .true.
2387 contains
2398 procedure, public :: get_command_string => cm_get_cmd
2403 procedure(cm_get_string_result), deferred, public :: get_color_string
2413 procedure, public :: get_label => cm_get_label
2423 procedure, public :: set_label => cm_set_label
2435 procedure, public :: get_horizontal => cm_get_horizontal
2447 procedure, public :: set_horizontal => cm_set_horizontal
2458 procedure, public :: get_draw_border => cm_get_draw_border
2469 procedure, public :: set_draw_border => cm_set_draw_border
2480 procedure, public :: get_show_tics => cm_get_show_tics
2502 procedure, public :: set_show_tics => cm_set_show_tics
2503 end type
2504
2505! ------------------------------------------------------------------------------
2507 type, extends(colormap) :: rainbow_colormap
2508 contains
2518 procedure, public :: get_color_string => rcm_get_clr
2519 end type
2520
2521! ------------------------------------------------------------------------------
2523 type, extends(colormap) :: hot_colormap
2524 contains
2534 procedure, public :: get_color_string => hcm_get_clr
2535 end type
2536
2537! ------------------------------------------------------------------------------
2539 type, extends(colormap) :: cool_colormap
2540 contains
2550 procedure, public :: get_color_string => ccm_get_clr
2551 end type
2552
2553! ------------------------------------------------------------------------------
2555 type, extends(colormap) :: parula_colormap
2556 contains
2566 procedure, public :: get_color_string => pcm_get_clr
2567 end type
2568
2569! ------------------------------------------------------------------------------
2571 type, extends(colormap) :: grey_colormap
2572 contains
2582 procedure, public :: get_color_string => gcm_get_clr
2583 end type
2584
2585! ------------------------------------------------------------------------------
2587 type, extends(colormap) :: earth_colormap
2588 contains
2598 procedure, public :: get_color_string => ecm_get_clr
2599 end type
2600
2601! ------------------------------------------------------------------------------
2604 type, extends(colormap) :: custom_colormap
2605 class(cmap), private, pointer :: m_map => null()
2606 contains
2607 final :: custom_final
2617 procedure, public :: get_color_string => custom_get_clr
2639 procedure, public :: set_colormap => custom_set
2649 procedure, public :: get_colormap => custom_get
2650 end type
2651
2652! ------------------------------------------------------------------------------
2653 interface
2654 module function cm_get_cmd(this) result(x)
2655 class(colormap), intent(in) :: this
2656 character(len = :), allocatable :: x
2657 end function
2658
2659 pure module function cm_get_label(this) result(rst)
2660 class(colormap), intent(in) :: this
2661 character(len = :), allocatable :: rst
2662 end function
2663
2664 module subroutine cm_set_label(this, x)
2665 class(colormap), intent(inout) :: this
2666 character(len = *), intent(in) :: x
2667 end subroutine
2668
2669 pure module function cm_get_horizontal(this) result(rst)
2670 class(colormap), intent(in) :: this
2671 logical :: rst
2672 end function
2673
2674 module subroutine cm_set_horizontal(this, x)
2675 class(colormap), intent(inout) :: this
2676 logical, intent(in) :: x
2677 end subroutine
2678
2679 pure module function cm_get_draw_border(this) result(rst)
2680 class(colormap), intent(in) :: this
2681 logical :: rst
2682 end function
2683
2684 module subroutine cm_set_draw_border(this, x)
2685 class(colormap), intent(inout) :: this
2686 logical, intent(in) :: x
2687 end subroutine
2688
2689 pure module function cm_get_show_tics(this) result(rst)
2690 class(colormap), intent(in) :: this
2691 logical :: rst
2692 end function
2693
2694 module subroutine cm_set_show_tics(this, x)
2695 class(colormap), intent(inout) :: this
2696 logical, intent(in) :: x
2697 end subroutine
2698
2699 ! --------------------
2700
2701 module function rcm_get_clr(this) result(x)
2702 class(rainbow_colormap), intent(in) :: this
2703 character(len = :), allocatable :: x
2704 end function
2705
2706 ! --------------------
2707
2708 module function hcm_get_clr(this) result(x)
2709 class(hot_colormap), intent(in) :: this
2710 character(len = :), allocatable :: x
2711 end function
2712
2713 ! --------------------
2714
2715 module function ccm_get_clr(this) result(x)
2716 class(cool_colormap), intent(in) :: this
2717 character(len = :), allocatable :: x
2718 end function
2719
2720 ! --------------------
2721
2722 module function pcm_get_clr(this) result(x)
2723 class(parula_colormap), intent(in) :: this
2724 character(len = :), allocatable :: x
2725 end function
2726
2727 ! --------------------
2728
2729 module function gcm_get_clr(this) result(x)
2730 class(grey_colormap), intent(in) :: this
2731 character(len = :), allocatable :: x
2732 end function
2733
2734 ! --------------------
2735
2736 module function ecm_get_clr(this) result(x)
2737 class(earth_colormap), intent(in) :: this
2738 character(len = :), allocatable :: x
2739 end function
2740
2741 ! --------------------
2742 module function custom_get_clr(this) result(x)
2743 class(custom_colormap), intent(in) :: this
2744 character(len = :), allocatable :: x
2745 end function
2746
2747 ! --------------------
2748 module subroutine custom_set(this, map, err)
2749 class(custom_colormap), intent(inout) :: this
2750 class(cmap), intent(in) :: map
2751 class(errors), intent(inout), optional, target :: err
2752 end subroutine
2753
2754 ! --------------------
2755 module function custom_get(this) result(rst)
2756 class(custom_colormap), intent(in) :: this
2757 class(cmap), pointer :: rst
2758 end function
2759
2760 ! --------------------
2761 module subroutine custom_final(this)
2762 type(custom_colormap), intent(inout) :: this
2763 end subroutine
2764
2765 ! --------------------
2766 end interface
2767
2768! ******************************************************************************
2769! FPLOT_PLOT.F90
2770! ------------------------------------------------------------------------------
2772 type, extends(plot_object) :: plot
2773 private
2775 character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_title = ""
2777 logical :: m_hastitle = .false.
2779 class(terminal), pointer :: m_terminal => null()
2781 type(list) :: m_data
2783 type(legend), pointer :: m_legend => null()
2785 logical :: m_showgrid = .true.
2787 logical :: m_ticsin = .true.
2789 logical :: m_drawborder = .true.
2791 type(list) :: m_labels ! Added 6/22/2018, JAC
2793 integer(int32) :: m_colorindex = 1
2795 logical :: m_axisequal = .false.
2797 class(colormap), pointer :: m_colormap
2799 logical :: m_showcolorbar = .true.
2801 type(list) :: m_arrows ! Added 1/3/2024, JAC
2802 contains
2813 procedure, public :: free_resources => plt_clean_up
2837 procedure, public :: initialize => plt_init
2847 procedure, public :: get_title => plt_get_title
2859 procedure, public :: set_title => plt_set_title
2871 procedure, public :: is_title_defined => plt_has_title
2881 procedure, public :: get_legend => plt_get_legend
2891 procedure, public :: get_count => plt_get_count
2907 procedure, public :: push => plt_push_data
2916 procedure, public :: pop => plt_pop_data
2925 procedure, public :: clear_all => plt_clear_all
2936 procedure, public :: get => plt_get
2947 procedure, public :: set => plt_set
2957 procedure, public :: get_terminal => plt_get_term
2967 procedure, public :: get_show_gridlines => plt_get_show_grid
2977 procedure, public :: set_show_gridlines => plt_set_show_grid
2996 procedure, public :: draw => plt_draw
3012 procedure, public :: save_file => plt_save
3022 procedure, public :: get_font_name => plt_get_font
3032 procedure, public :: set_font_name => plt_set_font
3042 procedure, public :: get_font_size => plt_get_font_size
3054 procedure, public :: set_font_size => plt_set_font_size
3066 procedure, public :: get_tics_inward => plt_get_tics_in
3078 procedure, public :: set_tics_inward => plt_set_tics_in
3088 procedure, public :: get_draw_border => plt_get_draw_border
3098 procedure, public :: set_draw_border => plt_set_draw_border
3111 procedure, public :: push_label => plt_push_label
3120 procedure, public :: pop_label => plt_pop_label
3131 procedure, public :: get_label => plt_get_label
3142 procedure, public :: set_label => plt_set_label
3152 procedure, public :: get_label_count => plt_get_label_count
3161 procedure, public :: clear_all_labels => plt_clear_labels
3172 procedure, public :: get_axis_equal => plt_get_axis_equal
3183 procedure, public :: set_axis_equal => plt_set_axis_equal
3194 procedure, public :: get_colormap => plt_get_colormap
3212 procedure, public :: set_colormap => plt_set_colormap
3222 procedure, public :: get_show_colorbar => plt_get_show_colorbar
3232 procedure, public :: set_show_colorbar => plt_set_show_colorbar
3243 procedure, public :: get_command_string => plt_get_cmd
3257 procedure, public :: push_arrow => plt_push_arrow
3266 procedure, public :: pop_arrow => plt_pop_arrow
3276 procedure, public :: get_arrow => plt_get_arrow
3288 procedure, public :: set_arrow => plt_set_arrow
3300 procedure, public :: get_arrow_count => plt_get_arrow_count
3309 procedure, public :: clear_arrows => plt_clear_arrows
3310 end type
3311
3312! ------------------------------------------------------------------------------
3313 interface
3314 module subroutine plt_clean_up(this)
3315 class(plot), intent(inout) :: this
3316 end subroutine
3317
3318 module subroutine plt_init(this, term, fname, err)
3319 class(plot), intent(inout) :: this
3320 integer(int32), intent(in), optional :: term
3321 character(len = *), intent(in), optional :: fname
3322 class(errors), intent(inout), optional, target :: err
3323 end subroutine
3324
3325 module function plt_get_title(this) result(txt)
3326 class(plot), intent(in) :: this
3327 character(len = :), allocatable :: txt
3328 end function
3329
3330 module subroutine plt_set_title(this, txt)
3331 class(plot), intent(inout) :: this
3332 character(len = *), intent(in) :: txt
3333 end subroutine
3334
3335 pure module function plt_has_title(this) result(x)
3336 class(plot), intent(in) :: this
3337 logical :: x
3338 end function
3339
3340 module function plt_get_legend(this) result(x)
3341 class(plot), intent(in) :: this
3342 type(legend), pointer :: x
3343 end function
3344
3345 pure module function plt_get_count(this) result(x)
3346 class(plot), intent(in) :: this
3347 integer(int32) :: x
3348 end function
3349
3350 module subroutine plt_push_data(this, x, err)
3351 class(plot), intent(inout) :: this
3352 class(plot_data), intent(inout) :: x
3353 class(errors), intent(inout), optional, target :: err
3354 end subroutine
3355
3356 module subroutine plt_pop_data(this)
3357 class(plot), intent(inout) :: this
3358 end subroutine
3359
3360 module subroutine plt_clear_all(this)
3361 class(plot), intent(inout) :: this
3362 end subroutine
3363
3364 module function plt_get(this, i) result(x)
3365 class(plot), intent(in) :: this
3366 integer(int32), intent(in) :: i
3367 class(plot_data), pointer :: x
3368 end function
3369
3370 module subroutine plt_set(this, i, x)
3371 class(plot), intent(inout) :: this
3372 integer(int32), intent(in) :: i
3373 class(plot_data), intent(in) :: x
3374 end subroutine
3375
3376 module function plt_get_term(this) result(x)
3377 class(plot), intent(in) :: this
3378 class(terminal), pointer :: x
3379 end function
3380
3381 pure module function plt_get_show_grid(this) result(x)
3382 class(plot), intent(in) :: this
3383 logical :: x
3384 end function
3385
3386 module subroutine plt_set_show_grid(this, x)
3387 class(plot), intent(inout) :: this
3388 logical, intent(in) :: x
3389 end subroutine
3390
3391 module subroutine plt_draw(this, persist, err)
3392 class(plot), intent(in) :: this
3393 logical, intent(in), optional :: persist
3394 class(errors), intent(inout), optional, target :: err
3395 end subroutine
3396
3397 module subroutine plt_save(this, fname, err)
3398 class(plot), intent(in) :: this
3399 character(len = *), intent(in) :: fname
3400 class(errors), intent(inout), optional, target :: err
3401 end subroutine
3402
3403 module function plt_get_font(this) result(x)
3404 class(plot), intent(in) :: this
3405 character(len = :), allocatable :: x
3406 end function
3407
3408 module subroutine plt_set_font(this, x)
3409 class(plot), intent(inout) :: this
3410 character(len = *), intent(in) :: x
3411 end subroutine
3412
3413 module function plt_get_font_size(this) result(x)
3414 class(plot), intent(in) :: this
3415 integer(int32) :: x
3416 end function
3417
3418 module subroutine plt_set_font_size(this, x)
3419 class(plot), intent(inout) :: this
3420 integer(int32), intent(in) :: x
3421 end subroutine
3422
3423 pure module function plt_get_tics_in(this) result(x)
3424 class(plot), intent(in) :: this
3425 logical :: x
3426 end function
3427
3428 module subroutine plt_set_tics_in(this, x)
3429 class(plot), intent(inout) :: this
3430 logical, intent(in) :: x
3431 end subroutine
3432
3433 pure module function plt_get_draw_border(this) result(x)
3434 class(plot), intent(in) :: this
3435 logical :: x
3436 end function
3437
3438 module subroutine plt_set_draw_border(this, x)
3439 class(plot), intent(inout) :: this
3440 logical, intent(in) :: x
3441 end subroutine
3442
3443 module subroutine plt_push_label(this, lbl, err)
3444 class(plot), intent(inout) :: this
3445 class(plot_label), intent(in) :: lbl
3446 class(errors), intent(inout), optional, target :: err
3447 end subroutine
3448
3449 module subroutine plt_pop_label(this)
3450 class(plot), intent(inout) :: this
3451 end subroutine
3452
3453 module function plt_get_label(this, i) result(x)
3454 class(plot), intent(in) :: this
3455 integer(int32), intent(in) :: i
3456 class(plot_label), pointer :: x
3457 end function
3458
3459 module subroutine plt_set_label(this, i, x)
3460 class(plot), intent(inout) :: this
3461 integer(int32), intent(in) :: i
3462 class(plot_label), intent(in) :: x
3463 end subroutine
3464
3465 pure module function plt_get_label_count(this) result(x)
3466 class(plot), intent(in) :: this
3467 integer(int32) :: x
3468 end function
3469
3470 module subroutine plt_clear_labels(this)
3471 class(plot), intent(inout) :: this
3472 end subroutine
3473
3474 pure module function plt_get_axis_equal(this) result(rst)
3475 class(plot), intent(in) :: this
3476 logical :: rst
3477 end function
3478
3479 module subroutine plt_set_axis_equal(this, x)
3480 class(plot), intent(inout) :: this
3481 logical, intent(in) :: x
3482 end subroutine
3483
3484 module function plt_get_colormap(this) result(x)
3485 class(plot), intent(in) :: this
3486 class(colormap), pointer :: x
3487 end function
3488
3489 module subroutine plt_set_colormap(this, x, err)
3490 class(plot), intent(inout) :: this
3491 class(colormap), intent(in) :: x
3492 class(errors), intent(inout), optional, target :: err
3493 end subroutine
3494
3495 pure module function plt_get_show_colorbar(this) result(x)
3496 class(plot), intent(in) :: this
3497 logical :: x
3498 end function
3499
3500 module subroutine plt_set_show_colorbar(this, x)
3501 class(plot), intent(inout) :: this
3502 logical, intent(in) :: x
3503 end subroutine
3504
3505 module function plt_get_cmd(this) result(x)
3506 class(plot), intent(in) :: this
3507 character(len = :), allocatable :: x
3508 end function
3509
3510 module subroutine plt_push_arrow(this, x, err)
3511 class(plot), intent(inout) :: this
3512 class(plot_arrow), intent(in) :: x
3513 class(errors), intent(inout), optional, target :: err
3514 end subroutine
3515
3516 module subroutine plt_pop_arrow(this)
3517 class(plot), intent(inout) :: this
3518 end subroutine
3519
3520 module function plt_get_arrow(this, i) result(rst)
3521 class(plot), intent(in) :: this
3522 integer(int32), intent(in) :: i
3523 class(plot_arrow), pointer :: rst
3524 end function
3525
3526 module subroutine plt_set_arrow(this, i, x)
3527 class(plot), intent(inout) :: this
3528 integer(int32), intent(in) :: i
3529 class(plot_arrow), intent(in) :: x
3530 end subroutine
3531
3532 pure module function plt_get_arrow_count(this) result(rst)
3533 class(plot), intent(in) :: this
3534 integer(int32) :: rst
3535 end function
3536
3537 module subroutine plt_clear_arrows(this)
3538 class(plot), intent(inout) :: this
3539 end subroutine
3540 end interface
3541
3542! ******************************************************************************
3543! FPLOT_SCATTER_PLOT_DATA.F90
3544! ------------------------------------------------------------------------------
3546 type, abstract, extends(plot_data_colored) :: scatter_plot_data
3547 private
3549 logical :: m_drawline = .true.
3551 logical :: m_drawmarkers = .false.
3553 integer(int32) :: m_markerfrequency = 1
3555 real(real32) :: m_linewidth = 1.0
3557 integer(int32) :: m_linestyle = line_solid
3559 integer(int32) :: m_markertype = marker_x
3561 real(real32) :: m_markersize = 1.0
3564 logical :: m_simplifydata = .true.
3568 real(real64) :: m_simplifyfactor = 1.0d-3
3570 logical :: m_datadependentcolors = .false.
3572 logical :: m_filledcurve = .false.
3574 logical :: m_usevariablesizepoints = .false.
3575 contains
3586 procedure, public :: get_command_string => spd_get_cmd
3596 procedure, public :: get_line_width => spd_get_line_width
3606 procedure, public :: set_line_width => spd_set_line_width
3621 procedure, public :: get_line_style => spd_get_line_style
3637 procedure, public :: set_line_style => spd_set_line_style
3647 procedure, public :: get_draw_line => spd_get_draw_line
3657 procedure, public :: set_draw_line => spd_set_draw_line
3668 procedure, public :: get_draw_markers => spd_get_draw_markers
3679 procedure, public :: set_draw_markers => spd_set_draw_markers
3702 procedure, public :: get_marker_style => spd_get_marker_style
3726 procedure, public :: set_marker_style => spd_set_marker_style
3736 procedure, public :: get_marker_scaling => spd_get_marker_scaling
3746 procedure, public :: set_marker_scaling => spd_set_marker_scaling
3756 procedure, public :: get_marker_frequency => spd_get_marker_frequency
3766 procedure, public :: set_marker_frequency => spd_set_marker_frequency
3768 procedure(spd_get_int_value), deferred, public :: get_count
3770 procedure(spd_get_value), deferred, public :: get_x
3772 procedure(spd_set_value), deferred, public :: set_x
3774 procedure(spd_get_value), deferred, public :: get_y
3776 procedure(spd_set_value), deferred, public :: set_y
3779 procedure(spd_get_string_result), deferred, public :: get_axes_string
3791 procedure, public :: get_simplify_data => spd_get_simplify_data
3803 procedure, public :: set_simplify_data => spd_set_simplify_data
3813 procedure, public :: get_simplification_factor => spd_get_simplify_factor
3825 procedure, public :: set_simplification_factor => spd_set_simplify_factor
3837 procedure, public :: get_use_data_dependent_colors => &
3838 spd_get_data_dependent_colors
3850 procedure, public :: set_use_data_dependent_colors => &
3851 spd_set_data_dependent_colors
3862 procedure, public :: get_fill_curve => spd_get_filled
3873 procedure, public :: set_fill_curve => spd_set_filled
3885 procedure, public :: get_use_variable_size_points => spd_get_use_var_point_size
3898 procedure, public :: set_use_variable_size_points => spd_set_use_var_point_size
3899 end type
3900
3901! ------------------------------------------------------------------------------
3902 interface
3903 module function spd_get_cmd(this) result(x)
3904 class(scatter_plot_data), intent(in) :: this
3905 character(len = :), allocatable :: x
3906 end function
3907
3908 pure module function spd_get_line_width(this) result(x)
3909 class(scatter_plot_data), intent(in) :: this
3910 real(real32) :: x
3911 end function
3912
3913 module subroutine spd_set_line_width(this, x)
3914 class(scatter_plot_data), intent(inout) :: this
3915 real(real32), intent(in) :: x
3916 end subroutine
3917
3918 pure module function spd_get_line_style(this) result(x)
3919 class(scatter_plot_data), intent(in) :: this
3920 integer(int32) :: x
3921 end function
3922
3923 module subroutine spd_set_line_style(this, x)
3924 class(scatter_plot_data), intent(inout) :: this
3925 integer(int32), intent(in) :: x
3926 end subroutine
3927
3928 pure module function spd_get_draw_line(this) result(x)
3929 class(scatter_plot_data), intent(in) :: this
3930 logical :: x
3931 end function
3932
3933 module subroutine spd_set_draw_line(this, x)
3934 class(scatter_plot_data), intent(inout) :: this
3935 logical, intent(in) :: x
3936 end subroutine
3937
3938 pure module function spd_get_draw_markers(this) result(x)
3939 class(scatter_plot_data), intent(in) :: this
3940 logical :: x
3941 end function
3942
3943 module subroutine spd_set_draw_markers(this, x)
3944 class(scatter_plot_data), intent(inout) :: this
3945 logical, intent(in) :: x
3946 end subroutine
3947
3948 pure module function spd_get_marker_style(this) result(x)
3949 class(scatter_plot_data), intent(in) :: this
3950 integer(int32) :: x
3951 end function
3952
3953 module subroutine spd_set_marker_style(this, x)
3954 class(scatter_plot_data), intent(inout) :: this
3955 integer(int32), intent(in) :: x
3956 end subroutine
3957
3958 pure module function spd_get_marker_scaling(this) result(x)
3959 class(scatter_plot_data), intent(in) :: this
3960 real(real32) :: x
3961 end function
3962
3963 module subroutine spd_set_marker_scaling(this, x)
3964 class(scatter_plot_data), intent(inout) :: this
3965 real(real32), intent(in) :: x
3966 end subroutine
3967
3968 pure module function spd_get_marker_frequency(this) result(x)
3969 class(scatter_plot_data), intent(in) :: this
3970 integer(int32) :: x
3971 end function
3972
3973 module subroutine spd_set_marker_frequency(this, x)
3974 class(scatter_plot_data), intent(inout) :: this
3975 integer(int32), intent(in) :: x
3976 end subroutine
3977
3978 pure module function spd_get_simplify_data(this) result(x)
3979 class(scatter_plot_data), intent(in) :: this
3980 logical :: x
3981 end function
3982
3983 module subroutine spd_set_simplify_data(this, x)
3984 class(scatter_plot_data), intent(inout) :: this
3985 logical, intent(in) :: x
3986 end subroutine
3987
3988 pure module function spd_get_simplify_factor(this) result(x)
3989 class(scatter_plot_data), intent(in) :: this
3990 real(real64) :: x
3991 end function
3992
3993 module subroutine spd_set_simplify_factor(this, x)
3994 class(scatter_plot_data), intent(inout) :: this
3995 real(real64), intent(in) :: x
3996 end subroutine
3997
3998 pure module function spd_get_data_dependent_colors(this) result(rst)
3999 class(scatter_plot_data), intent(in) :: this
4000 logical :: rst
4001 end function
4002
4003 module subroutine spd_set_data_dependent_colors(this, x)
4004 class(scatter_plot_data), intent(inout) :: this
4005 logical, intent(in) :: x
4006 end subroutine
4007
4008 pure module function spd_get_filled(this) result(rst)
4009 class(scatter_plot_data), intent(in) :: this
4010 logical :: rst
4011 end function
4012
4013 module subroutine spd_set_filled(this, x)
4014 class(scatter_plot_data), intent(inout) :: this
4015 logical, intent(in) :: x
4016 end subroutine
4017
4018 pure module function spd_get_use_var_point_size(this) result(rst)
4019 class(scatter_plot_data), intent(in) :: this
4020 logical :: rst
4021 end function
4022
4023 module subroutine spd_set_use_var_point_size(this, x)
4024 class(scatter_plot_data), intent(inout) :: this
4025 logical, intent(in) :: x
4026 end subroutine
4027 end interface
4028
4029! ******************************************************************************
4030! FPLOT_PLOT_DATA_2D.F90
4031! ------------------------------------------------------------------------------
4033 type, extends(scatter_plot_data) :: plot_data_2d
4034 private
4036 real(real64), allocatable, dimension(:,:) :: m_data
4038 logical :: m_usey2 = .false.
4039 contains
4050 procedure, public :: get_axes_string => pd2d_get_axes_cmd
4061 procedure, public :: get_data_string => pd2d_get_data_cmd
4071 procedure, public :: get_count => pd2d_get_data_count
4082 procedure, public :: get_x => pd2d_get_x_data
4093 procedure, public :: set_x => pd2d_set_x_data
4104 procedure, public :: get_y => pd2d_get_y_data
4115 procedure, public :: set_y => pd2d_set_y_data
4127 procedure, public :: get_draw_against_y2 => pd2d_get_draw_against_y2
4139 procedure, public :: set_draw_against_y2 => pd2d_set_draw_against_y2
4199 generic, public :: define_data => pd2d_set_data_1, pd2d_set_data_2
4200 procedure :: pd2d_set_data_1
4201 procedure :: pd2d_set_data_2
4202
4212 procedure, public :: get_x_data => pd2d_get_x_array
4222 procedure, public :: get_y_data => pd2d_get_y_array
4232 procedure, public :: get_color_data => pd2d_get_c_array
4242 procedure, public :: get_point_size_data => pd2d_get_ps_array
4243 end type
4244
4245! ------------------------------------------------------------------------------
4246 interface
4247 module function pd2d_get_axes_cmd(this) result(x)
4248 class(plot_data_2d), intent(in) :: this
4249 character(len = :), allocatable :: x
4250 end function
4251
4252 module function pd2d_get_data_cmd(this) result(x)
4253 class(plot_data_2d), intent(in) :: this
4254 character(len = :), allocatable :: x
4255 end function
4256
4257 pure module function pd2d_get_data_count(this) result(x)
4258 class(plot_data_2d), intent(in) :: this
4259 integer(int32) :: x
4260 end function
4261
4262 pure module function pd2d_get_x_data(this, index) result(x)
4263 class(plot_data_2d), intent(in) :: this
4264 integer(int32), intent(in) :: index
4265 real(real64) :: x
4266 end function
4267
4268 module subroutine pd2d_set_x_data(this, index, x)
4269 class(plot_data_2d), intent(inout) :: this
4270 integer(int32), intent(in) :: index
4271 real(real64), intent(in) :: x
4272 end subroutine
4273
4274 pure module function pd2d_get_y_data(this, index) result(x)
4275 class(plot_data_2d), intent(in) :: this
4276 integer(int32), intent(in) :: index
4277 real(real64) :: x
4278 end function
4279
4280 module subroutine pd2d_set_y_data(this, index, x)
4281 class(plot_data_2d), intent(inout) :: this
4282 integer(int32), intent(in) :: index
4283 real(real64), intent(in) :: x
4284 end subroutine
4285
4286 module subroutine pd2d_set_data_1(this, x, y, c, ps, err)
4287 class(plot_data_2d), intent(inout) :: this
4288 real(real64), intent(in), dimension(:) :: x, y
4289 real(real64), intent(in), dimension(:), optional :: c, ps
4290 class(errors), intent(inout), optional, target :: err
4291 end subroutine
4292
4293 pure module function pd2d_get_draw_against_y2(this) result(x)
4294 class(plot_data_2d), intent(in) :: this
4295 logical :: x
4296 end function
4297
4298 module subroutine pd2d_set_draw_against_y2(this, x)
4299 class(plot_data_2d), intent(inout) :: this
4300 logical, intent(in) :: x
4301 end subroutine
4302
4303 module subroutine pd2d_set_data_2(this, y, err)
4304 class(plot_data_2d), intent(inout) :: this
4305 real(real64), intent(in), dimension(:) :: y
4306 class(errors), intent(inout), optional, target :: err
4307 end subroutine
4308
4309 module function pd2d_get_x_array(this) result(x)
4310 class(plot_data_2d), intent(in) :: this
4311 real(real64), allocatable, dimension(:) :: x
4312 end function
4313
4314 module function pd2d_get_y_array(this) result(x)
4315 class(plot_data_2d), intent(in) :: this
4316 real(real64), allocatable, dimension(:) :: x
4317 end function
4318
4319 module function pd2d_get_c_array(this) result(x)
4320 class(plot_data_2d), intent(in) :: this
4321 real(real64), allocatable, dimension(:) :: x
4322 end function
4323
4324 module function pd2d_get_ps_array(this) result(x)
4325 class(plot_data_2d), intent(in) :: this
4326 real(real64), allocatable, dimension(:) :: x
4327 end function
4328 end interface
4329
4330! ******************************************************************************
4331! FPLOT_PLOT_DATA_3D.F90
4332! ------------------------------------------------------------------------------
4334 type, extends(scatter_plot_data) :: plot_data_3d
4335 private
4337 real(real64), allocatable, dimension(:,:) :: m_data
4338 contains
4348 procedure, public :: get_count => pd3d_get_data_count
4359 procedure, public :: get_x => pd3d_get_x_data
4370 procedure, public :: set_x => pd3d_set_x_data
4381 procedure, public :: get_y => pd3d_get_y_data
4392 procedure, public :: set_y => pd3d_set_y_data
4403 procedure, public :: get_z => pd3d_get_z_data
4414 procedure, public :: set_z => pd3d_set_z_data
4425 procedure, public :: get_axes_string => pd3d_get_axes_cmd
4436 procedure, public :: get_data_string => pd3d_get_data_cmd
4456 procedure, public :: define_data => pd3d_set_data_1
4466 procedure, public :: get_x_data => pd3d_get_x_array
4476 procedure, public :: get_y_data => pd3d_get_y_array
4486 procedure, public :: get_z_data => pd3d_get_z_array
4496 procedure, public :: get_color_data => pd3d_get_c_array
4506 procedure, public :: get_point_size_data => pd3d_get_c_array
4507 end type
4508
4509! ------------------------------------------------------------------------------
4510 interface
4511 pure module function pd3d_get_data_count(this) result(x)
4512 class(plot_data_3d), intent(in) :: this
4513 integer(int32) :: x
4514 end function
4515
4516 pure module function pd3d_get_x_data(this, index) result(x)
4517 class(plot_data_3d), intent(in) :: this
4518 integer(int32), intent(in) :: index
4519 real(real64) :: x
4520 end function
4521
4522 module subroutine pd3d_set_x_data(this, index, x)
4523 class(plot_data_3d), intent(inout) :: this
4524 integer(int32), intent(in) :: index
4525 real(real64), intent(in) :: x
4526 end subroutine
4527
4528 pure module function pd3d_get_y_data(this, index) result(x)
4529 class(plot_data_3d), intent(in) :: this
4530 integer(int32), intent(in) :: index
4531 real(real64) :: x
4532 end function
4533
4534 module subroutine pd3d_set_y_data(this, index, x)
4535 class(plot_data_3d), intent(inout) :: this
4536 integer(int32), intent(in) :: index
4537 real(real64), intent(in) :: x
4538 end subroutine
4539
4540 pure module function pd3d_get_z_data(this, index) result(x)
4541 class(plot_data_3d), intent(in) :: this
4542 integer(int32), intent(in) :: index
4543 real(real64) :: x
4544 end function
4545
4546 module subroutine pd3d_set_z_data(this, index, x)
4547 class(plot_data_3d), intent(inout) :: this
4548 integer(int32), intent(in) :: index
4549 real(real64), intent(in) :: x
4550 end subroutine
4551
4552 module function pd3d_get_axes_cmd(this) result(x)
4553 class(plot_data_3d), intent(in) :: this
4554 character(len = :), allocatable :: x
4555 end function
4556
4557 module function pd3d_get_data_cmd(this) result(x)
4558 class(plot_data_3d), intent(in) :: this
4559 character(len = :), allocatable :: x
4560 end function
4561
4562 module subroutine pd3d_set_data_1(this, x, y, z, c, ps, err)
4563 class(plot_data_3d), intent(inout) :: this
4564 real(real64), intent(in), dimension(:) :: x, y, z
4565 real(real64), intent(in), dimension(:), optional :: c, ps
4566 class(errors), intent(inout), optional, target :: err
4567 end subroutine
4568
4569 module function pd3d_get_x_array(this) result(x)
4570 class(plot_data_3d), intent(in) :: this
4571 real(real64), allocatable, dimension(:) :: x
4572 end function
4573
4574 module function pd3d_get_y_array(this) result(x)
4575 class(plot_data_3d), intent(in) :: this
4576 real(real64), allocatable, dimension(:) :: x
4577 end function
4578
4579 module function pd3d_get_z_array(this) result(x)
4580 class(plot_data_3d), intent(in) :: this
4581 real(real64), allocatable, dimension(:) :: x
4582 end function
4583
4584 module function pd3d_get_c_array(this) result(x)
4585 class(plot_data_3d), intent(in) :: this
4586 real(real64), allocatable, dimension(:) :: x
4587 end function
4588
4589 module function pd3d_get_ps_array(this) result(x)
4590 class(plot_data_3d), intent(in) :: this
4591 real(real64), allocatable, dimension(:) :: x
4592 end function
4593 end interface
4594
4595! ******************************************************************************
4596! FPLOT_SURFACE_PLOT_DATA.F90
4597! ------------------------------------------------------------------------------
4599 type, extends(plot_data) :: surface_plot_data
4600 private
4602 real(real64), allocatable, dimension(:,:) :: m_x
4604 real(real64), allocatable, dimension(:,:) :: m_y
4606 real(real64), allocatable, dimension(:,:) :: m_z
4609 logical :: m_wireframe = .false.
4610 contains
4622 procedure, public :: get_size => surfd_get_size
4634 procedure, public :: get_x => surfd_get_x
4646 procedure, public :: set_x => surfd_set_x
4658 procedure, public :: get_y => surfd_get_y
4670 procedure, public :: set_y => surfd_set_y
4682 procedure, public :: get_z => surfd_get_z
4694 procedure, public :: set_z => surfd_set_z
4706 procedure, public :: get_use_wireframe => surfd_get_wireframe
4718 procedure, public :: set_use_wireframe => surfd_set_wireframe
4729 procedure, public :: get_command_string => surfd_get_cmd
4740 procedure, public :: get_data_string => surfd_get_data_cmd
4760 procedure, public :: define_data => surfd_set_data_1
4761 end type
4762
4763! ------------------------------------------------------------------------------
4764 interface
4765 pure module function surfd_get_size(this, dim) result(x)
4766 class(surface_plot_data), intent(in) :: this
4767 integer(int32), intent(in) :: dim
4768 integer(int32) :: x
4769 end function
4770
4771 pure module function surfd_get_x(this, i, j) result(x)
4772 class(surface_plot_data), intent(in) :: this
4773 integer(int32), intent(in) :: i, j
4774 real(real64) :: x
4775 end function
4776
4777 module subroutine surfd_set_x(this, i, j, x)
4778 class(surface_plot_data), intent(inout) :: this
4779 integer(int32), intent(in) :: i, j
4780 real(real64), intent(in) :: x
4781 end subroutine
4782
4783 pure module function surfd_get_y(this, i, j) result(x)
4784 class(surface_plot_data), intent(in) :: this
4785 integer(int32), intent(in) :: i, j
4786 real(real64) :: x
4787 end function
4788
4789 module subroutine surfd_set_y(this, i, j, x)
4790 class(surface_plot_data), intent(inout) :: this
4791 integer(int32), intent(in) :: i, j
4792 real(real64), intent(in) :: x
4793 end subroutine
4794
4795 pure module function surfd_get_z(this, i, j) result(x)
4796 class(surface_plot_data), intent(in) :: this
4797 integer(int32), intent(in) :: i, j
4798 real(real64) :: x
4799 end function
4800
4801 module subroutine surfd_set_z(this, i, j, x)
4802 class(surface_plot_data), intent(inout) :: this
4803 integer(int32), intent(in) :: i, j
4804 real(real64), intent(in) :: x
4805 end subroutine
4806
4807 pure module function surfd_get_wireframe(this) result(x)
4808 class(surface_plot_data), intent(in) :: this
4809 logical :: x
4810 end function
4811
4812 module subroutine surfd_set_wireframe(this, x)
4813 class(surface_plot_data), intent(inout) :: this
4814 logical, intent(in) :: x
4815 end subroutine
4816
4817 module function surfd_get_cmd(this) result(x)
4818 class(surface_plot_data), intent(in) :: this
4819 character(len = :), allocatable :: x
4820 end function
4821
4822 module function surfd_get_data_cmd(this) result(x)
4823 class(surface_plot_data), intent(in) :: this
4824 character(len = :), allocatable :: x
4825 end function
4826
4827 module subroutine surfd_set_data_1(this, x, y, z, err)
4828 class(surface_plot_data), intent(inout) :: this
4829 real(real64), intent(in), dimension(:,:) :: x, y, z
4830 class(errors), intent(inout), optional, target :: err
4831 end subroutine
4832 end interface
4833
4834! ******************************************************************************
4835! FPLOT_PLOT_2D.F90
4836! ------------------------------------------------------------------------------
4838 type, extends(plot) :: plot_2d
4839 private
4841 type(x_axis), pointer :: m_xaxis => null()
4843 type(y_axis), pointer :: m_yaxis => null()
4845 type(y2_axis), pointer :: m_y2axis => null()
4847 logical :: m_usey2 = .false.
4849 logical :: m_set2square = .false.
4850 contains
4859 final :: p2d_clean_up
4883 procedure, public :: initialize => p2d_init
4894 procedure, public :: get_command_string => p2d_get_cmd
4905 procedure, public :: get_x_axis => p2d_get_x_axis
4915 procedure, public :: get_y_axis => p2d_get_y_axis
4925 procedure, public :: get_y2_axis => p2d_get_y2_axis
4936 procedure, public :: get_use_y2_axis => p2d_get_use_y2
4947 procedure, public :: set_use_y2_axis => p2d_set_use_y2
4959 procedure, public :: get_square_axes => p2d_get_square_axes
4971 procedure, public :: set_square_axes => p2d_set_square_axes
4972 end type
4973
4974! ------------------------------------------------------------------------------
4975 interface
4976 module subroutine p2d_clean_up(this)
4977 type(plot_2d), intent(inout) :: this
4978 end subroutine
4979
4980 module subroutine p2d_init(this, term, fname, err)
4981 class(plot_2d), intent(inout) :: this
4982 integer(int32), intent(in), optional :: term
4983 character(len = *), intent(in), optional :: fname
4984 class(errors), intent(inout), optional, target :: err
4985 end subroutine
4986
4987 module function p2d_get_cmd(this) result(x)
4988 class(plot_2d), intent(in) :: this
4989 character(len = :), allocatable :: x
4990 end function
4991
4992 module function p2d_get_x_axis(this) result(ptr)
4993 class(plot_2d), intent(in) :: this
4994 class(plot_axis), pointer :: ptr
4995 end function
4996
4997 module function p2d_get_y_axis(this) result(ptr)
4998 class(plot_2d), intent(in) :: this
4999 class(plot_axis), pointer :: ptr
5000 end function
5001
5002 module function p2d_get_y2_axis(this) result(ptr)
5003 class(plot_2d), intent(in) :: this
5004 class(plot_axis), pointer :: ptr
5005 end function
5006
5007 pure module function p2d_get_use_y2(this) result(x)
5008 class(plot_2d), intent(in) :: this
5009 logical :: x
5010 end function
5011
5012 module subroutine p2d_set_use_y2(this, x)
5013 class(plot_2d), intent(inout) :: this
5014 logical, intent(in) :: x
5015 end subroutine
5016
5017 pure module function p2d_get_square_axes(this) result(rst)
5018 class(plot_2d), intent(in) :: this
5019 logical :: rst
5020 end function
5021
5022 module subroutine p2d_set_square_axes(this, x)
5023 class(plot_2d), intent(inout) :: this
5024 logical, intent(in) :: x
5025 end subroutine
5026 end interface
5027
5028! ******************************************************************************
5029! FPLOT_PLOT_3D.F90
5030! ------------------------------------------------------------------------------
5032 type, extends(plot) :: plot_3d
5033 private
5035 type(x_axis), pointer :: m_xaxis => null()
5037 type(y_axis), pointer :: m_yaxis => null()
5039 type(z_axis), pointer :: m_zaxis => null()
5041 real(real64) :: m_elevation = 60.0d0
5043 real(real64) :: m_azimuth = 30.0d0
5045 logical :: m_zintersect = .true.
5047 logical :: m_setmap = .false.
5049 integer(int32) :: m_csys = coordinates_cartesian
5050 contains
5054 final :: p3d_clean_up
5078 procedure, public :: initialize => p3d_init
5089 procedure, public :: get_command_string => p3d_get_cmd
5099 procedure, public :: get_x_axis => p3d_get_x_axis
5109 procedure, public :: get_y_axis => p3d_get_y_axis
5119 procedure, public :: get_z_axis => p3d_get_z_axis
5129 procedure, public :: get_elevation => p3d_get_elevation
5139 procedure, public :: set_elevation => p3d_set_elevation
5149 procedure, public :: get_azimuth => p3d_get_azimuth
5159 procedure, public :: set_azimuth => p3d_set_azimuth
5171 procedure, public :: get_z_intersect_xy => p3d_get_z_axis_intersect
5183 procedure, public :: set_z_intersect_xy => p3d_set_z_axis_intersect
5194 procedure, public :: get_use_map_view => p3d_get_use_map_view
5205 procedure, public :: set_use_map_view => p3d_set_use_map_view
5218 procedure, public :: get_coordinate_system => p3d_get_csys
5232 procedure, public :: set_coordinate_system => p3d_set_csys
5233 end type
5234
5235! ------------------------------------------------------------------------------
5236 interface
5237 module subroutine p3d_clean_up(this)
5238 type(plot_3d), intent(inout) :: this
5239 end subroutine
5240
5241 module subroutine p3d_init(this, term, fname, err)
5242 class(plot_3d), intent(inout) :: this
5243 integer(int32), intent(in), optional :: term
5244 character(len = *), intent(in), optional :: fname
5245 class(errors), intent(inout), optional, target :: err
5246 end subroutine
5247
5248 module function p3d_get_cmd(this) result(x)
5249 class(plot_3d), intent(in) :: this
5250 character(len = :), allocatable :: x
5251 end function
5252
5253 module function p3d_get_x_axis(this) result(ptr)
5254 class(plot_3d), intent(in) :: this
5255 class(plot_axis), pointer :: ptr
5256 end function
5257
5258 module function p3d_get_y_axis(this) result(ptr)
5259 class(plot_3d), intent(in) :: this
5260 class(plot_axis), pointer :: ptr
5261 end function
5262
5263 module function p3d_get_z_axis(this) result(ptr)
5264 class(plot_3d), intent(in) :: this
5265 class(plot_axis), pointer :: ptr
5266 end function
5267
5268 pure module function p3d_get_elevation(this) result(x)
5269 class(plot_3d), intent(in) :: this
5270 real(real64) :: x
5271 end function
5272
5273 module subroutine p3d_set_elevation(this, x)
5274 class(plot_3d), intent(inout) :: this
5275 real(real64), intent(in) :: x
5276 end subroutine
5277
5278 pure module function p3d_get_azimuth(this) result(x)
5279 class(plot_3d), intent(in) :: this
5280 real(real64) :: x
5281 end function
5282
5283 module subroutine p3d_set_azimuth(this, x)
5284 class(plot_3d), intent(inout) :: this
5285 real(real64), intent(in) :: x
5286 end subroutine
5287
5288 pure module function p3d_get_z_axis_intersect(this) result(x)
5289 class(plot_3d), intent(in) :: this
5290 logical :: x
5291 end function
5292
5293 module subroutine p3d_set_z_axis_intersect(this, x)
5294 class(plot_3d), intent(inout) :: this
5295 logical, intent(in) :: x
5296 end subroutine
5297
5298 pure module function p3d_get_use_map_view(this) result(rst)
5299 class(plot_3d), intent(in) :: this
5300 logical :: rst
5301 end function
5302
5303 module subroutine p3d_set_use_map_view(this, x)
5304 class(plot_3d), intent(inout) :: this
5305 logical, intent(in) :: x
5306 end subroutine
5307
5308 pure module function p3d_get_csys(this) result(rst)
5309 class(plot_3d), intent(in) :: this
5310 integer(int32) :: rst
5311 end function
5312
5313 module subroutine p3d_set_csys(this, x)
5314 class(plot_3d), intent(inout) :: this
5315 integer(int32), intent(in) :: x
5316 end subroutine
5317 end interface
5318
5319! ******************************************************************************
5320! FPLOT_SURFACE_PLOT.F90
5321! ------------------------------------------------------------------------------
5323 type, extends(plot_3d) :: surface_plot
5324 private
5326 logical :: m_showhidden = .false.
5328 ! class(colormap), pointer :: m_colormap
5330 logical :: m_smooth = .true.
5332 logical :: m_contour = .false.
5333 ! !> Show the colorbar?
5334 ! logical :: m_showColorbar = .true.
5336 logical :: m_uselighting = .false.
5338 real(real32) :: m_lightintensity = 0.5
5340 real(real32) :: m_specular = 0.5
5342 real(real32) :: m_transparency = 1.0
5343 contains
5347 ! final :: surf_clean_up
5371 procedure, public :: initialize => surf_init
5381 procedure, public :: get_show_hidden => surf_get_show_hidden
5391 procedure, public :: set_show_hidden => surf_set_show_hidden
5402 procedure, public :: get_command_string => surf_get_cmd
5413 procedure, public :: get_allow_smoothing => surf_get_smooth
5424 procedure, public :: set_allow_smoothing => surf_set_smooth
5436 procedure, public :: get_show_contours => surf_get_show_contours
5448 procedure, public :: set_show_contours => surf_set_show_contours
5459 procedure, public :: get_use_lighting => surf_get_use_lighting
5470 procedure, public :: set_use_lighting => surf_set_use_lighting
5481 procedure, public :: get_light_intensity => surf_get_light_intensity
5493 procedure, public :: set_light_intensity => surf_set_light_intensity
5504 procedure, public :: get_specular_intensity => surf_get_specular_intensity
5517 procedure, public :: set_specular_intensity => surf_set_specular_intensity
5528 procedure, public :: get_transparency => surf_get_transparency
5541 procedure, public :: set_transparency => surf_set_transparency
5542 end type
5543
5544! ------------------------------------------------------------------------------
5545 interface
5546 ! module subroutine surf_clean_up(this)
5547 ! type(surface_plot), intent(inout) :: this
5548 ! end subroutine
5549
5550 module subroutine surf_init(this, term, fname, err)
5551 class(surface_plot), intent(inout) :: this
5552 integer(int32), intent(in), optional :: term
5553 character(len = *), intent(in), optional :: fname
5554 class(errors), intent(inout), optional, target :: err
5555 end subroutine
5556
5557 pure module function surf_get_show_hidden(this) result(x)
5558 class(surface_plot), intent(in) :: this
5559 logical :: x
5560 end function
5561
5562 module subroutine surf_set_show_hidden(this, x)
5563 class(surface_plot), intent(inout) :: this
5564 logical, intent(in) :: x
5565 end subroutine
5566
5567 module function surf_get_cmd(this) result(x)
5568 class(surface_plot), intent(in) :: this
5569 character(len = :), allocatable :: x
5570 end function
5571
5572 ! module function surf_get_colormap(this) result(x)
5573 ! class(surface_plot), intent(in) :: this
5574 ! class(colormap), pointer :: x
5575 ! end function
5576
5577 ! module subroutine surf_set_colormap(this, x, err)
5578 ! class(surface_plot), intent(inout) :: this
5579 ! class(colormap), intent(in) :: x
5580 ! class(errors), intent(inout), optional, target :: err
5581 ! end subroutine
5582
5583 pure module function surf_get_smooth(this) result(x)
5584 class(surface_plot), intent(in) :: this
5585 logical :: x
5586 end function
5587
5588 module subroutine surf_set_smooth(this, x)
5589 class(surface_plot), intent(inout) :: this
5590 logical, intent(in) :: x
5591 end subroutine
5592
5593 pure module function surf_get_show_contours(this) result(x)
5594 class(surface_plot), intent(in) :: this
5595 logical :: x
5596 end function
5597
5598 module subroutine surf_set_show_contours(this, x)
5599 class(surface_plot), intent(inout) :: this
5600 logical, intent(in) :: x
5601 end subroutine
5602
5603 ! pure module function surf_get_show_colorbar(this) result(x)
5604 ! class(surface_plot), intent(in) :: this
5605 ! logical :: x
5606 ! end function
5607
5608 ! module subroutine surf_set_show_colorbar(this, x)
5609 ! class(surface_plot), intent(inout) :: this
5610 ! logical, intent(in) :: x
5611 ! end subroutine
5612
5613 pure module function surf_get_use_lighting(this) result(x)
5614 class(surface_plot), intent(in) :: this
5615 logical :: x
5616 end function
5617
5618 module subroutine surf_set_use_lighting(this, x)
5619 class(surface_plot), intent(inout) :: this
5620 logical, intent(in) :: x
5621 end subroutine
5622
5623 pure module function surf_get_light_intensity(this) result(x)
5624 class(surface_plot), intent(in) :: this
5625 real(real32) :: x
5626 end function
5627
5628 module subroutine surf_set_light_intensity(this, x)
5629 class(surface_plot), intent(inout) :: this
5630 real(real32), intent(in) :: x
5631 end subroutine
5632
5633 pure module function surf_get_specular_intensity(this) result(x)
5634 class(surface_plot), intent(in) :: this
5635 real(real32) :: x
5636 end function
5637
5638 module subroutine surf_set_specular_intensity(this, x)
5639 class(surface_plot), intent(inout) :: this
5640 real(real32), intent(in) :: x
5641 end subroutine
5642
5643 pure module function surf_get_transparency(this) result(x)
5644 class(surface_plot), intent(in) :: this
5645 real(real32) :: x
5646 end function
5647
5648 module subroutine surf_set_transparency(this, x)
5649 class(surface_plot), intent(inout) :: this
5650 real(real32), intent(in) :: x
5651 end subroutine
5652 end interface
5653
5654! ******************************************************************************
5655! FPLOT_AXIS.F90
5656! ------------------------------------------------------------------------------
5666 type, extends(plot_axis) :: x_axis
5668 character :: m_id = "x"
5669 contains
5671 procedure, public :: get_id_string => xa_get_id
5672 end type
5673
5674! ------------------------------------------------------------------------------
5684 type, extends(plot_axis) :: y_axis
5686 character :: m_id = "y"
5687 contains
5689 procedure, public :: get_id_string => ya_get_id
5690 end type
5691
5692! ------------------------------------------------------------------------------
5702 type, extends(plot_axis) :: y2_axis
5704 character(len = 2) :: m_id = "y2"
5705 contains
5707 procedure, public :: get_id_string => y2a_get_id
5708 end type
5709
5710! ------------------------------------------------------------------------------
5720 type, extends(plot_axis) :: z_axis
5722 character :: m_id = "z"
5723 contains
5725 procedure, public :: get_id_string => za_get_id
5726 end type
5727
5728! ------------------------------------------------------------------------------
5729 interface
5730 module function xa_get_id(this) result(x)
5731 class(x_axis), intent(in) :: this
5732 character(len = :), allocatable :: x
5733 end function
5734
5735 module function ya_get_id(this) result(x)
5736 class(y_axis), intent(in) :: this
5737 character(len = :), allocatable :: x
5738 end function
5739
5740 module function y2a_get_id(this) result(x)
5741 class(y2_axis), intent(in) :: this
5742 character(len = :), allocatable :: x
5743 end function
5744
5745 module function za_get_id(this) result(x)
5746 class(z_axis), intent(in) :: this
5747 character(len = :), allocatable :: x
5748 end function
5749 end interface
5750
5751! ******************************************************************************
5752! ABSTRACT METHOD INTERFACES
5753! ------------------------------------------------------------------------------
5754 interface
5755
5759 function get_string_result(this) result(x)
5760 import plot_object
5761 class(plot_object), intent(in) :: this
5762 character(len = :), allocatable :: x
5763 end function
5764
5769 function term_get_string_result(this) result(x)
5770 import terminal
5771 class(terminal), intent(in) :: this
5772 character(len = :), allocatable :: x
5773 end function
5774
5779 function pd_get_string_result(this) result(x)
5780 import plot_data
5781 class(plot_data), intent(in) :: this
5782 character(len = :), allocatable :: x
5783 end function
5784
5789 function pa_get_string_result(this) result(x)
5790 import plot_axis
5791 class(plot_axis), intent(in) :: this
5792 character(len = :), allocatable :: x
5793 end function
5794
5800 pure function spd_get_value(this, index) result(x)
5801 use, intrinsic :: iso_fortran_env, only : int32, real64
5802 import scatter_plot_data
5803 class(scatter_plot_data), intent(in) :: this
5804 integer(int32), intent(in) :: index
5805 real(real64) :: x
5806 end function
5807
5813 subroutine spd_set_value(this, index, x)
5814 use, intrinsic :: iso_fortran_env, only : int32, real64
5815 import scatter_plot_data
5816 class(scatter_plot_data), intent(inout) :: this
5817 integer(int32), intent(in) :: index
5818 real(real64), intent(in) :: x
5819 end subroutine
5820
5825 pure function spd_get_int_value(this) result(x)
5826 use, intrinsic :: iso_fortran_env, only : int32
5827 import scatter_plot_data
5828 class(scatter_plot_data), intent(in) :: this
5829 integer(int32) :: x
5830 end function
5831
5836 function spd_get_string_result(this) result(x)
5837 import scatter_plot_data
5838 class(scatter_plot_data), intent(in) :: this
5839 character(len = :), allocatable :: x
5840 end function
5841
5846 function cm_get_string_result(this) result(x)
5847 import colormap
5848 class(colormap), intent(in) :: this
5849 character(len = :), allocatable :: x
5850 end function
5851 end interface
5852
5853! ******************************************************************************
5854! FPLOT_MULTIPLOT.F90
5855! ------------------------------------------------------------------------------
5857 type, extends(plot_object) :: multiplot
5859 type(list) :: m_plots
5861 integer(int32) :: m_rows = 0
5863 integer(int32) :: m_cols = 0
5865 character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_title
5867 logical :: m_hastitle = .false.
5869 class(terminal), pointer :: m_terminal => null()
5870 contains
5871 final :: mp_clean
5872 procedure, public :: get_command_string => mp_get_command
5894 procedure, public :: initialize => mp_init
5904 procedure, public :: get_row_count => mp_get_rows
5914 procedure, public :: get_column_count => mp_get_cols
5924 procedure, public :: get_plot_count => mp_get_count
5934 procedure, public :: get_title => mp_get_title
5946 procedure, public :: set_title => mp_set_title
5965 procedure, public :: draw => mp_draw
5977 procedure, public :: get => mp_get
5989 procedure, public :: set => mp_set
6001 procedure, public :: is_title_defined => mp_has_title
6011 procedure, public :: get_terminal => mp_get_term
6027 procedure, public :: save_file => mp_save
6037 procedure, public :: get_font_name => mp_get_font
6047 procedure, public :: set_font_name => mp_set_font
6057 procedure, public :: get_font_size => mp_get_font_size
6069 procedure, public :: set_font_size => mp_set_font_size
6070 end type
6071
6072! ------------------------------------------------------------------------------
6073 interface
6074 module function mp_get_command(this) result(x)
6075 class(multiplot), intent(in) :: this
6076 character(len = :), allocatable :: x
6077 end function
6078
6079 module subroutine mp_init(this, m, n, term, err)
6080 class(multiplot), intent(inout) :: this
6081 integer(int32), intent(in) :: m, n
6082 integer(int32), intent(in), optional :: term
6083 class(errors), intent(inout), optional, target :: err
6084 end subroutine
6085
6086 module subroutine mp_clean(this)
6087 type(multiplot), intent(inout) :: this
6088 end subroutine
6089
6090 pure module function mp_get_rows(this) result(x)
6091 class(multiplot), intent(in) :: this
6092 integer(int32) :: x
6093 end function
6094
6095 pure module function mp_get_cols(this) result(x)
6096 class(multiplot), intent(in) :: this
6097 integer(int32) :: x
6098 end function
6099
6100 pure module function mp_get_count(this) result(x)
6101 class(multiplot), intent(in) :: this
6102 integer(int32) :: x
6103 end function
6104
6105 module function mp_get_title(this) result(x)
6106 class(multiplot), intent(in) :: this
6107 character(len = :), allocatable :: x
6108 end function
6109
6110 module subroutine mp_set_title(this, x)
6111 class(multiplot), intent(inout) :: this
6112 character(len = *), intent(in) :: x
6113 end subroutine
6114
6115 module subroutine mp_draw(this, persist, err)
6116 class(multiplot), intent(in) :: this
6117 logical, intent(in), optional :: persist
6118 class(errors), intent(inout), optional, target :: err
6119 end subroutine
6120
6121 module function mp_get(this, i, j) result(x)
6122 class(multiplot), intent(in) :: this
6123 integer(int32), intent(in) :: i, j
6124 class(plot), pointer :: x
6125 end function
6126
6127 module subroutine mp_set(this, i, j, x)
6128 class(multiplot), intent(inout) :: this
6129 integer(int32), intent(in) :: i, j
6130 class(plot), intent(in) :: x
6131 end subroutine
6132
6133 pure module function mp_has_title(this) result(x)
6134 class(multiplot), intent(in) :: this
6135 logical :: x
6136 end function
6137
6138 module function mp_get_term(this) result(x)
6139 class(multiplot), intent(in) :: this
6140 class(terminal), pointer :: x
6141 end function
6142
6143 module subroutine mp_save(this, fname, err)
6144 class(multiplot), intent(in) :: this
6145 character(len = *), intent(in) :: fname
6146 class(errors), intent(inout), optional, target :: err
6147 end subroutine
6148
6149 module function mp_get_font(this) result(x)
6150 class(multiplot), intent(in) :: this
6151 character(len = :), allocatable :: x
6152 end function
6153
6154 module subroutine mp_set_font(this, x)
6155 class(multiplot), intent(inout) :: this
6156 character(len = *), intent(in) :: x
6157 end subroutine
6158
6159 module function mp_get_font_size(this) result(x)
6160 class(multiplot), intent(in) :: this
6161 integer(int32) :: x
6162 end function
6163
6164 module subroutine mp_set_font_size(this, x)
6165 class(multiplot), intent(inout) :: this
6166 integer(int32), intent(in) :: x
6167 end subroutine
6168 end interface
6169
6170! ******************************************************************************
6171! FPLOT_PLOT_DATA_ERRORS.F90
6172! ------------------------------------------------------------------------------
6174 type, extends(plot_data_colored) :: plot_data_error_bars
6176 logical :: m_xbars = .false.
6178 logical :: m_ybars = .false.
6182 real(real64), allocatable, dimension(:,:) :: m_data
6184 logical :: m_box = .false.
6186 logical :: m_range = .false.
6187 contains
6188 procedure, public :: get_command_string => pde_get_cmd
6189 procedure, public :: get_data_string => pde_get_data_cmd
6221 generic, public :: define_x_error_data => pde_define_x_err, &
6222 pde_define_x_err_lim
6254 generic, public :: define_y_error_data => pde_define_y_err, &
6255 pde_define_y_err_lim
6293 generic, public :: define_xy_error_data => pde_define_xy_err, &
6294 pde_define_xy_err_lim
6306 procedure, public :: get_plot_x_error_bars => pde_get_plot_x_err
6318 procedure, public :: get_plot_y_error_bars => pde_get_plot_y_err
6323 procedure, public :: get_count => pde_get_count
6338 procedure, public :: get_use_error_box => pde_get_box
6353 procedure, public :: set_use_error_box => pde_set_box
6364 procedure, public :: get_use_range => pde_get_use_range
6365
6366 procedure :: pde_define_x_err
6367 procedure :: pde_define_y_err
6368 procedure :: pde_define_xy_err
6369 procedure :: pde_define_x_err_lim
6370 procedure :: pde_define_y_err_lim
6371 procedure :: pde_define_xy_err_lim
6372 end type
6373
6374! ------------------------------------------------------------------------------
6375 interface
6376 module function pde_get_cmd(this) result(cmd)
6377 class(plot_data_error_bars), intent(in) :: this
6378 character(len = :), allocatable :: cmd
6379 end function
6380
6381 module function pde_get_data_cmd(this) result(cmd)
6382 class(plot_data_error_bars), intent(in) :: this
6383 character(len = :), allocatable :: cmd
6384 end function
6385
6386 module subroutine pde_define_x_err(this, x, y, xerr, err)
6387 class(plot_data_error_bars), intent(inout) :: this
6388 real(real64), intent(in), dimension(:) :: x, y, xerr
6389 class(errors), intent(inout), optional, target :: err
6390 end subroutine
6391
6392 module subroutine pde_define_y_err(this, x, y, yerr, err)
6393 class(plot_data_error_bars), intent(inout) :: this
6394 real(real64), intent(in), dimension(:) :: x, y, yerr
6395 class(errors), intent(inout), optional, target :: err
6396 end subroutine
6397
6398 module subroutine pde_define_xy_err(this, x, y, xerr, yerr, err)
6399 class(plot_data_error_bars), intent(inout) :: this
6400 real(real64), intent(in), dimension(:) :: x, y, xerr, yerr
6401 class(errors), intent(inout), optional, target :: err
6402 end subroutine
6403
6404 pure module function pde_get_plot_x_err(this) result(x)
6405 class(plot_data_error_bars), intent(in) :: this
6406 logical :: x
6407 end function
6408
6409 pure module function pde_get_plot_y_err(this) result(x)
6410 class(plot_data_error_bars), intent(in) :: this
6411 logical :: x
6412 end function
6413
6414 pure module function pde_get_count(this) result(x)
6415 class(plot_data_error_bars), intent(in) :: this
6416 integer(int32) :: x
6417 end function
6418
6419 pure module function pde_get_box(this) result(x)
6420 class(plot_data_error_bars), intent(in) :: this
6421 logical :: x
6422 end function
6423
6424 module subroutine pde_set_box(this, x)
6425 class(plot_data_error_bars), intent(inout) :: this
6426 logical, intent(in) :: x
6427 end subroutine
6428
6429 pure module function pde_get_use_range(this) result(x)
6430 class(plot_data_error_bars), intent(in) :: this
6431 logical :: x
6432 end function
6433
6434 module subroutine pde_define_x_err_lim(this, x, y, xmin, xmax, err)
6435 class(plot_data_error_bars), intent(inout) :: this
6436 real(real64), intent(in), dimension(:) :: x, y, xmin, xmax
6437 class(errors), intent(inout), optional, target :: err
6438 end subroutine
6439
6440 module subroutine pde_define_y_err_lim(this, x, y, ymin, ymax, err)
6441 class(plot_data_error_bars), intent(inout) :: this
6442 real(real64), intent(in), dimension(:) :: x, y, ymin, ymax
6443 class(errors), intent(inout), optional, target :: err
6444 end subroutine
6445
6446 module subroutine pde_define_xy_err_lim(this, x, y, xmin, xmax, ymin, &
6447 ymax, err)
6448 class(plot_data_error_bars), intent(inout) :: this
6449 real(real64), intent(in), dimension(:) :: x, y, xmin, xmax, &
6450 ymin, ymax
6451 class(errors), intent(inout), optional, target :: err
6452 end subroutine
6453 end interface
6454
6455! ******************************************************************************
6456! FPLOT_PLOT_DATA_BAR.F90
6457! ------------------------------------------------------------------------------
6459 type, extends(plot_data_colored) :: plot_data_bar
6460 private
6462 type(string), allocatable, dimension(:) :: m_axislabels
6465 real(real64), allocatable, dimension(:,:) :: m_bardata
6469 logical :: m_useaxislabels = .true.
6471 logical :: m_usey2 = .false.
6473 logical :: m_filled = .true.
6475 real(real32) :: m_alpha = 1.0
6476 contains
6477 procedure, public :: get_count => pdb_get_count
6478 procedure, public :: get => pdb_get_data
6479 procedure, public :: set => pdb_set_data
6480 procedure, public :: get_data => pdb_get_data_set
6481 procedure, public :: get_label => pdb_get_label
6482 procedure, public :: set_label => pdb_set_label
6483 procedure, public :: get_use_labels => pdb_get_use_labels
6484 procedure, public :: set_use_labels => pdb_set_use_labels
6485 procedure, public :: get_command_string => pdb_get_cmd
6486 procedure, public :: get_data_string => pdb_get_data_cmd
6487 procedure, public :: get_axes_string => pdb_get_axes_cmd
6488 procedure, public :: get_bar_per_label_count => pdb_get_col_count
6489 procedure, public :: get_draw_against_y2 => pdb_get_use_y2
6490 procedure, public :: set_draw_against_y2 => pdb_set_use_y2
6491 procedure, public :: get_is_filled => pdb_get_is_filled
6492 procedure, public :: set_is_filled => pdb_set_is_filled
6493 procedure, public :: get_transparency => pdb_get_alpha
6494 procedure, public :: set_transparency => pdb_set_alpha
6495 generic, public :: define_data => pdb_set_data_1, pdb_set_data_2, &
6496 pdb_set_data_3
6497 procedure :: pdb_set_data_1
6498 procedure :: pdb_set_data_2
6499 procedure :: pdb_set_data_3
6500 procedure :: set_data_1 => pdb_set_data_1_core
6501 procedure :: set_data_2 => pdb_set_data_2_core
6502 procedure :: set_data_3 => pdb_set_data_3_core
6503 end type
6504
6505! ------------------------------------------------------------------------------
6506 interface
6507 pure module function pdb_get_count(this) result(x)
6508 class(plot_data_bar), intent(in) :: this
6509 integer(int32) :: x
6510 end function
6511
6512 pure module function pdb_get_data(this, index, col) result(x)
6513 class(plot_data_bar), intent(in) :: this
6514 integer(int32), intent(in) :: index, col
6515 real(real64) :: x
6516 end function
6517
6518 module subroutine pdb_set_data(this, index, col, x)
6519 class(plot_data_bar), intent(inout) :: this
6520 integer(int32), intent(in) :: index, col
6521 real(real64), intent(in) :: x
6522 end subroutine
6523
6524 pure module function pdb_get_data_set(this, col) result(x)
6525 class(plot_data_bar), intent(in) :: this
6526 integer(int32), intent(in) :: col
6527 real(real64), allocatable, dimension(:) :: x
6528 end function
6529
6530 pure module function pdb_get_label(this, index) result(x)
6531 class(plot_data_bar), intent(in) :: this
6532 integer(int32), intent(in) :: index
6533 character(len = :), allocatable :: x
6534 end function
6535
6536 module subroutine pdb_set_label(this, index, txt)
6537 class(plot_data_bar), intent(inout) :: this
6538 integer(int32) :: index
6539 character(len = *), intent(in) :: txt
6540 end subroutine
6541
6542 pure module function pdb_get_use_labels(this) result(x)
6543 class(plot_data_bar), intent(in) :: this
6544 logical :: x
6545 end function
6546
6547 module subroutine pdb_set_use_labels(this, x)
6548 class(plot_data_bar), intent(inout) :: this
6549 logical, intent(in) :: x
6550 end subroutine
6551
6552 module function pdb_get_cmd(this) result(x)
6553 class(plot_data_bar), intent(in) :: this
6554 character(len = :), allocatable :: x
6555 end function
6556
6557 module function pdb_get_data_cmd(this) result(x)
6558 class(plot_data_bar), intent(in) :: this
6559 character(len = :), allocatable :: x
6560 end function
6561
6562 module function pdb_get_axes_cmd(this) result(x)
6563 class(plot_data_bar), intent(in) :: this
6564 character(len = :), allocatable :: x
6565 end function
6566
6567 pure module function pdb_get_col_count(this) result(x)
6568 class(plot_data_bar), intent(in) :: this
6569 integer(int32) :: x
6570 end function
6571
6572 pure module function pdb_get_use_y2(this) result(x)
6573 class(plot_data_bar), intent(in) :: this
6574 logical :: x
6575 end function
6576
6577 module subroutine pdb_set_use_y2(this, x)
6578 class(plot_data_bar), intent(inout) :: this
6579 logical, intent(in) :: x
6580 end subroutine
6581
6582 pure module function pdb_get_is_filled(this) result(x)
6583 class(plot_data_bar), intent(in) :: this
6584 logical :: x
6585 end function
6586
6587 module subroutine pdb_set_is_filled(this, x)
6588 class(plot_data_bar), intent(inout) :: this
6589 logical, intent(in) :: x
6590 end subroutine
6591
6592 module subroutine pdb_set_data_1(this, x, err)
6593 class(plot_data_bar), intent(inout) :: this
6594 real(real64), intent(in), dimension(:) :: x
6595 class(errors), intent(inout), optional, target :: err
6596 end subroutine
6597
6598 module subroutine pdb_set_data_2(this, labels, x, err)
6599 class(plot_data_bar), intent(inout) :: this
6600 class(string), intent(in), dimension(:) :: labels
6601 real(real64), intent(in), dimension(:) :: x
6602 class(errors), intent(inout), optional, target :: err
6603 end subroutine
6604
6605 module subroutine pdb_set_data_3(this, labels, x, fmt, err)
6606 class(plot_data_bar), intent(inout) :: this
6607 real(real64), intent(in), dimension(:) :: labels
6608 real(real64), intent(in), dimension(:) :: x
6609 character(len = *), intent(in), optional :: fmt
6610 class(errors), intent(inout), optional, target :: err
6611 end subroutine
6612
6613 pure module function pdb_get_alpha(this) result(x)
6614 class(plot_data_bar), intent(in) :: this
6615 real(real32) :: x
6616 end function
6617
6618 module subroutine pdb_set_alpha(this, x)
6619 class(plot_data_bar), intent(inout) :: this
6620 real(real32), intent(in) :: x
6621 end subroutine
6622
6623 module subroutine pdb_set_data_1_core(this, x, err)
6624 class(plot_data_bar), intent(inout) :: this
6625 real(real64), intent(in), dimension(:) :: x
6626 class(errors), intent(inout), optional, target :: err
6627 end subroutine
6628
6629 module subroutine pdb_set_data_2_core(this, labels, x, err)
6630 class(plot_data_bar), intent(inout) :: this
6631 class(string), intent(in), dimension(:) :: labels
6632 real(real64), intent(in), dimension(:) :: x
6633 class(errors), intent(inout), optional, target :: err
6634 end subroutine
6635
6636 module subroutine pdb_set_data_3_core(this, labels, x, fmt, err)
6637 class(plot_data_bar), intent(inout) :: this
6638 real(real64), intent(in), dimension(:) :: labels
6639 real(real64), intent(in), dimension(:) :: x
6640 character(len = *), intent(in), optional :: fmt
6641 class(errors), intent(inout), optional, target :: err
6642 end subroutine
6643 end interface
6644
6645! ******************************************************************************
6646! FPLOT_PLOT_DATA_HISTOGRAM.F90
6647! ------------------------------------------------------------------------------
6649 type, extends(plot_data_bar) :: plot_data_histogram
6650 private
6652 integer(int32) :: m_bincount = 10
6654 character(len = :), allocatable :: m_numberfmt
6655 contains
6656 procedure, public :: get_bin_count => pdh_get_bin_count
6657 procedure, public :: set_bin_count => pdh_set_bin_count
6658 procedure, public :: bin_data => pdh_bin_data
6659 procedure, public :: get_extreme_values => pdh_get_extremes
6660 procedure, public :: get_number_format => pdh_get_num_fmt
6661 procedure, public :: set_number_format => pdh_set_num_fmt
6662 procedure :: set_data_1 => pdh_set_data_1
6663 procedure :: set_data_2 => pdh_set_data_2
6664 procedure :: set_data_3 => pdh_set_data_3
6665 end type
6666
6667! ------------------------------------------------------------------------------
6668 interface
6669 pure module function pdh_get_bin_count(this) result(x)
6670 class(plot_data_histogram), intent(in) :: this
6671 integer(int32) :: x
6672 end function
6673
6674 module subroutine pdh_set_bin_count(this, x)
6675 class(plot_data_histogram), intent(inout) :: this
6676 integer(int32), intent(in) :: x
6677 end subroutine
6678
6679 module function pdh_bin_data(this, x, err) result(bx)
6680 class(plot_data_histogram), intent(in) :: this
6681 real(real64), intent(in), dimension(:) :: x
6682 class(errors), intent(inout), optional, target :: err
6683 real(real64), allocatable, dimension(:,:) :: bx
6684 end function
6685
6686 pure module function pdh_get_extremes(this) result(x)
6687 class(plot_data_histogram), intent(in) :: this
6688 real(real64), dimension(2) :: x
6689 end function
6690
6691 module subroutine pdh_set_data_1(this, x, err)
6692 class(plot_data_histogram), intent(inout) :: this
6693 real(real64), intent(in), dimension(:) :: x
6694 class(errors), intent(inout), optional, target :: err
6695 end subroutine
6696
6697 module subroutine pdh_set_data_2(this, labels, x, err)
6698 class(plot_data_histogram), intent(inout) :: this
6699 class(string), intent(in), dimension(:) :: labels
6700 real(real64), intent(in), dimension(:) :: x
6701 class(errors), intent(inout), optional, target :: err
6702 end subroutine
6703
6704 module subroutine pdh_set_data_3(this, labels, x, fmt, err)
6705 class(plot_data_histogram), intent(inout) :: this
6706 real(real64), intent(in), dimension(:) :: labels
6707 real(real64), intent(in), dimension(:) :: x
6708 character(len = *), intent(in), optional :: fmt
6709 class(errors), intent(inout), optional, target :: err
6710 end subroutine
6711
6712 pure module function pdh_get_num_fmt(this) result(x)
6713 class(plot_data_histogram), intent(in) :: this
6714 character(len = :), allocatable :: x
6715 end function
6716
6717 module subroutine pdh_set_num_fmt(this, x)
6718 class(plot_data_histogram), intent(inout) :: this
6719 character(len = *), intent(in) :: x
6720 end subroutine
6721 end interface
6722
6723! ******************************************************************************
6724! FPLOT_PLOT_BAR.F90
6725! ------------------------------------------------------------------------------
6727 type, extends(plot_2d) :: plot_bar
6728 private
6731 real(real32) :: m_barwidth = 0.75d0
6732 contains
6733 procedure, public :: get_bar_width => pb_get_bar_width
6734 procedure, public :: set_bar_width => pb_set_bar_width
6735 procedure, public :: get_command_string => pb_get_cmd
6736 end type
6737
6738! ------------------------------------------------------------------------------
6739 interface
6740 pure module function pb_get_bar_width(this) result(x)
6741 class(plot_bar), intent(in) :: this
6742 real(real32) :: x
6743 end function
6744
6745 module subroutine pb_set_bar_width(this, x)
6746 class(plot_bar), intent(inout) :: this
6747 real(real32), intent(in) :: x
6748 end subroutine
6749
6750 module function pb_get_cmd(this) result(x)
6751 class(plot_bar), intent(in) :: this
6752 character(len = :), allocatable :: x
6753 end function
6754 end interface
6755
6756
6757! ******************************************************************************
6758! FPLOT_TRIANGULATIONS_DELAUNAY_2D.F90
6759! ------------------------------------------------------------------------------
6765 type delaunay_tri_2d
6766 private
6768 real(real64), allocatable, dimension(:) :: m_x
6770 real(real64), allocatable, dimension(:) :: m_y
6773 integer(int32), allocatable, dimension(:,:) :: m_indices
6774 contains
6798 procedure, public :: create => d2d_init
6808 procedure, public :: get_point_count => d2d_get_pt_count
6818 procedure, public :: get_triangle_count => d2d_get_tri_count
6828 procedure, public :: get_points_x => d2d_get_x_pts
6838 procedure, public :: get_points_y => d2d_get_y_pts
6849 procedure, public :: get_indices => d2d_get_tris
6864 procedure, public :: find_triangle => d2d_get_tri_with_pt
6865 end type
6866
6867! ----------
6868 interface
6869 module subroutine d2d_init(this, x, y, err)
6870 class(delaunay_tri_2d), intent(inout) :: this
6871 real(real64), intent(in), dimension(:) :: x, y
6872 class(errors), intent(inout), target, optional :: err
6873 end subroutine
6874
6875 pure module function d2d_get_pt_count(this) result(rst)
6876 class(delaunay_tri_2d), intent(in) :: this
6877 integer(int32) :: rst
6878 end function
6879
6880 pure module function d2d_get_tri_count(this) result(rst)
6881 class(delaunay_tri_2d), intent(in) :: this
6882 integer(int32) :: rst
6883 end function
6884
6885 pure module function d2d_get_x_pts(this) result(rst)
6886 class(delaunay_tri_2d), intent(in) :: this
6887 real(real64), allocatable, dimension(:) :: rst
6888 end function
6889
6890 pure module function d2d_get_y_pts(this) result(rst)
6891 class(delaunay_tri_2d), intent(in) :: this
6892 real(real64), allocatable, dimension(:) :: rst
6893 end function
6894
6895 pure module function d2d_get_tris(this) result(rst)
6896 class(delaunay_tri_2d), intent(in) :: this
6897 integer(int32), allocatable, dimension(:,:) :: rst
6898 end function
6899
6900 pure module function d2d_get_tri_with_pt(this, x, y) result(rst)
6901 class(delaunay_tri_2d), intent(in) :: this
6902 real(real64), intent(in) :: x, y
6903 integer(int32) :: rst
6904 end function
6905 end interface
6906
6907! ******************************************************************************
6908! FPLOT_PLOT_DATA_TRI_2D.F90
6909! ------------------------------------------------------------------------------
6911 type, extends(plot_data_colored) :: plot_data_tri_2d
6912 private
6914 real(real64), allocatable, dimension(:) :: m_x
6916 real(real64), allocatable, dimension(:) :: m_y
6919 integer(int32), allocatable, dimension(:,:) :: m_indices
6921 real(real32) :: m_linewidth = 1.0
6923 integer(int32) :: m_linestyle = line_solid
6924 contains
6925 procedure, public :: get_data_string => pdt2d_get_data_cmd
6926 procedure, public :: get_command_string => pdt2d_get_cmd
6936 procedure, public :: define_data => pdt2d_define_data
6946 procedure, public :: get_line_width => pdt2d_get_line_width
6956 procedure, public :: set_line_width => pdt2d_set_line_width
6966 procedure, public :: get_line_style => pdt2d_get_line_style
6982 procedure, public :: set_line_style => pdt2d_set_line_style
6983 end type
6984
6985! --------------------
6986 interface
6987 module function pdt2d_get_data_cmd(this) result(x)
6988 class(plot_data_tri_2d), intent(in) :: this
6989 character(len = :), allocatable :: x
6990 end function
6991
6992 module function pdt2d_get_cmd(this) result(x)
6993 class(plot_data_tri_2d), intent(in) :: this
6994 character(len = :), allocatable :: x
6995 end function
6996
6997 module subroutine pdt2d_define_data(this, tri)
6998 class(plot_data_tri_2d), intent(inout) :: this
6999 class(delaunay_tri_2d), intent(in) :: tri
7000 end subroutine
7001
7002 module function pdt2d_get_axes_cmd(this) result(x)
7003 class(plot_data_tri_2d), intent(in) :: this
7004 character(len = :), allocatable :: x
7005 end function
7006
7007 pure module function pdt2d_get_line_width(this) result(rst)
7008 class(plot_data_tri_2d), intent(in) :: this
7009 real(real32) :: rst
7010 end function
7011
7012 module subroutine pdt2d_set_line_width(this, x)
7013 class(plot_data_tri_2d), intent(inout) :: this
7014 real(real32), intent(in) :: x
7015 end subroutine
7016
7017 pure module function pdt2d_get_line_style(this) result(rst)
7018 class(plot_data_tri_2d), intent(in) :: this
7019 integer(int32) :: rst
7020 end function
7021
7022 module subroutine pdt2d_set_line_style(this, x)
7023 class(plot_data_tri_2d), intent(inout) :: this
7024 integer(int32), intent(in) :: x
7025 end subroutine
7026 end interface
7027
7028! ******************************************************************************
7029! FPLOT_DELAUNAY_TRI_SURFACE.F90
7030! ------------------------------------------------------------------------------
7032 type, extends(delaunay_tri_2d) :: delaunay_tri_surface
7033 private
7035 real(real64), allocatable, dimension(:) :: m_z
7036 contains
7061 procedure, public :: define_function_values => dts_define_fcn
7071 procedure, public :: get_points_z => dts_get_z
7086 generic, public :: evaluate => dts_interp_1, dts_interp_2
7087
7088 procedure :: dts_interp_1
7089 procedure :: dts_interp_2
7090 end type
7091
7092! --------------------
7093 interface
7094 module subroutine dts_define_fcn(this, z, err)
7095 class(delaunay_tri_surface), intent(inout) :: this
7096 real(real64), intent(in), dimension(:) :: z
7097 class(errors), intent(inout), optional, target :: err
7098 end subroutine
7099
7100 pure module function dts_get_z(this) result(rst)
7101 class(delaunay_tri_surface), intent(in) :: this
7102 real(real64), allocatable, dimension(:) :: rst
7103 end function
7104
7105 pure module function dts_interp_1(this, x, y) result(z)
7106 class(delaunay_tri_surface), intent(in) :: this
7107 real(real64), intent(in) :: x, y
7108 real(real64) :: z
7109 end function
7110
7111 pure module function dts_interp_2(this, x, y) result(z)
7112 class(delaunay_tri_surface), intent(in) :: this
7113 real(real64), intent(in), dimension(:) :: x, y
7114 real(real64), allocatable, dimension(:) :: z
7115 end function
7116 end interface
7117
7118! ******************************************************************************
7119! FPLOT_TRI_SURFACE_PLOT_DATA.F90
7120! ------------------------------------------------------------------------------
7123 type, extends(plot_data) :: tri_surface_plot_data
7124 private
7126 real(real64), allocatable, dimension(:) :: m_x
7128 real(real64), allocatable, dimension(:) :: m_y
7130 real(real64), allocatable, dimension(:) :: m_z
7133 integer(int32), allocatable, dimension(:,:) :: m_indices
7135 logical :: m_wireframe = .true.
7136 contains
7137 procedure, public :: get_data_string => tspd_get_data_cmd
7138 procedure, public :: get_command_string => tspd_get_cmd
7150 procedure, public :: get_use_wireframe => tspd_get_wireframe
7162 procedure, public :: set_use_wireframe => tspd_set_wireframe
7172 procedure, public :: define_data => tspd_define_data
7173 end type
7174
7175! --------------------
7176 interface
7177 module function tspd_get_data_cmd(this) result(x)
7178 class(tri_surface_plot_data), intent(in) :: this
7179 character(len = :), allocatable :: x
7180 end function
7181
7182 module function tspd_get_cmd(this) result(x)
7183 class(tri_surface_plot_data), intent(in) :: this
7184 character(len = :), allocatable :: x
7185 end function
7186
7187 pure module function tspd_get_wireframe(this) result(rst)
7188 class(tri_surface_plot_data), intent(in) :: this
7189 logical :: rst
7190 end function
7191
7192 module subroutine tspd_set_wireframe(this, x)
7193 class(tri_surface_plot_data), intent(inout) :: this
7194 logical, intent(in) :: x
7195 end subroutine
7196
7197 module subroutine tspd_define_data(this, tri)
7198 class(tri_surface_plot_data), intent(inout) :: this
7199 class(delaunay_tri_surface), intent(in) :: tri
7200 end subroutine
7201 end interface
7202
7203! ******************************************************************************
7204! FPLOT_VECTOR_FIELD_PLOT_DATA.F90
7205! ------------------------------------------------------------------------------
7206 ! REF:
7207 ! http://www.gnuplotting.org/vector-field-from-data-file/
7208 ! http://gnuplot.sourceforge.net/demo_5.4/vector.html
7209 ! http://www.gnuplot.info/docs_5.4/Gnuplot_5_4.pdf (pg 79)
7210
7212 type, extends(plot_data_colored) :: vector_field_plot_data
7213 private
7217 real(real64), allocatable, dimension(:,:,:) :: m_data
7219 real(real64) :: m_arrowsize = 1.0d0
7221 logical :: m_filledheads = .false.
7222 contains
7233 procedure, public :: get_data_string => vfpd_get_data_cmd
7244 procedure, public :: get_command_string => vfpd_get_cmd
7267 procedure, public :: define_data => vfpd_define_data
7277 procedure, public :: get_arrow_size => vfpd_get_arrow_size
7287 procedure, public :: set_arrow_size => vfpd_set_arrow_size
7297 procedure, public :: get_fill_arrow => vfpd_get_fill_arrow
7307 procedure, public :: set_fill_arrow => vfpd_set_fill_arrow
7320 procedure, public :: get_use_data_dependent_colors => &
7321 vfpd_get_use_data_dependent_colors
7322 end type
7323
7324! --------------------
7325 interface
7326 module function vfpd_get_data_cmd(this) result(x)
7327 class(vector_field_plot_data), intent(in) :: this
7328 character(len = :), allocatable :: x
7329 end function
7330
7331 module function vfpd_get_cmd(this) result(x)
7332 class(vector_field_plot_data), intent(in) :: this
7333 character(len = :), allocatable :: x
7334 end function
7335
7336 module subroutine vfpd_define_data(this, x, y, dx, dy, c, err)
7337 class(vector_field_plot_data), intent(inout) :: this
7338 real(real64), intent(in), dimension(:,:) :: x, y, dx, dy
7339 real(real64), intent(in), dimension(:,:), optional :: c
7340 class(errors), intent(inout), optional, target :: err
7341 end subroutine
7342
7343 pure module function vfpd_get_arrow_size(this) result(rst)
7344 class(vector_field_plot_data), intent(in) :: this
7345 real(real64) :: rst
7346 end function
7347
7348 module subroutine vfpd_set_arrow_size(this, x)
7349 class(vector_field_plot_data), intent(inout) :: this
7350 real(real64), intent(in) :: x
7351 end subroutine
7352
7353 pure module function vfpd_get_fill_arrow(this) result(rst)
7354 class(vector_field_plot_data), intent(in) :: this
7355 logical :: rst
7356 end function
7357
7358 module subroutine vfpd_set_fill_arrow(this, x)
7359 class(vector_field_plot_data), intent(inout) :: this
7360 logical, intent(in) :: x
7361 end subroutine
7362
7363 pure module function vfpd_get_use_data_dependent_colors(this) result(rst)
7364 class(vector_field_plot_data), intent(in) :: this
7365 logical :: rst
7366 end function
7367 end interface
7368
7369! ******************************************************************************
7370! FPLOT_PLOT_POLAR.F90
7371! ------------------------------------------------------------------------------
7373 type, extends(plot) :: plot_polar
7374 private
7376 logical :: m_autoscale = .true.
7379 real(real64) :: m_minrad = 0.0d0
7382 real(real64) :: m_maxrad = 1.0d0
7384 character(len = :), allocatable :: m_thetastart
7386 character(len = :), allocatable :: m_thetadirection
7387 contains
7388 final :: plr_clean_up
7412 procedure, public :: initialize => plr_init
7423 procedure, public :: get_command_string => plr_get_cmd
7434 procedure, public :: get_autoscale => plr_get_autoscale
7445 procedure, public :: set_autoscale => plr_set_autoscale
7456 procedure, public :: get_radial_limits => plr_get_limits
7467 procedure, public :: set_radial_limits => plr_set_limits
7481 procedure, public :: get_theta_start_position => plr_get_theta_start
7496 procedure, public :: set_theta_start_position => plr_set_theta_start
7508 procedure, public :: get_theta_direction => plr_get_theta_direction
7520 procedure, public :: set_theta_direction => plr_set_theta_direction
7521 end type
7522
7523! --------------------
7524 interface
7525 module subroutine plr_clean_up(this)
7526 type(plot_polar), intent(inout) :: this
7527 end subroutine
7528
7529 module subroutine plr_init(this, term, fname, err)
7530 class(plot_polar), intent(inout) :: this
7531 integer(int32), intent(in), optional :: term
7532 character(len = *), intent(in), optional :: fname
7533 class(errors), intent(inout), optional, target :: err
7534 end subroutine
7535
7536 module function plr_get_cmd(this) result(x)
7537 class(plot_polar), intent(in) :: this
7538 character(len = :), allocatable :: x
7539 end function
7540
7541 pure module function plr_get_autoscale(this) result(rst)
7542 class(plot_polar), intent(in) :: this
7543 logical :: rst
7544 end function
7545
7546 module subroutine plr_set_autoscale(this, x)
7547 class(plot_polar), intent(inout) :: this
7548 logical, intent(in) :: x
7549 end subroutine
7550
7551 pure module function plr_get_limits(this) result(rst)
7552 class(plot_polar), intent(in) :: this
7553 real(real64) :: rst(2)
7554 end function
7555
7556 module subroutine plr_set_limits(this, x)
7557 class(plot_polar), intent(inout) :: this
7558 real(real64), intent(in) :: x(2)
7559 end subroutine
7560
7561 pure module function plr_get_theta_start(this) result(rst)
7562 class(plot_polar), intent(in) :: this
7563 character(len = :), allocatable :: rst
7564 end function
7565
7566 module subroutine plr_set_theta_start(this, x)
7567 class(plot_polar), intent(inout) :: this
7568 character(len = *), intent(in) :: x
7569 end subroutine
7570
7571 pure module function plr_get_theta_direction(this) result(rst)
7572 class(plot_polar), intent(in) :: this
7573 character(len = :), allocatable :: rst
7574 end function
7575
7576 module subroutine plr_set_theta_direction(this, x)
7577 class(plot_polar), intent(inout) :: this
7578 character(len = *), intent(in) :: x
7579 end subroutine
7580 end interface
7581
7582! ******************************************************************************
7583! FPLOT_FILLED_PLOT_DATA.F90
7584! ------------------------------------------------------------------------------
7586 type, extends(plot_data_colored) :: filled_plot_data
7587 private
7589 logical :: m_usey2 = .false.
7591 real(real64), allocatable, dimension(:,:) :: m_data
7592 contains
7603 procedure, public :: get_axes_string => fpd_get_axes_cmd
7615 procedure, public :: get_draw_against_y2 => fpd_get_draw_against_y2
7627 procedure, public :: set_draw_against_y2 => fpd_set_draw_against_y2
7638 procedure, public :: get_command_string => fpd_get_cmd
7649 procedure, public :: get_data_string => fpd_get_data_cmd
7669 procedure, public :: define_data => fpd_define_data
7670 end type
7671
7672! --------------------
7673 interface
7674 module function fpd_get_axes_cmd(this) result(x)
7675 class(filled_plot_data), intent(in) :: this
7676 character(len = :), allocatable :: x
7677 end function
7678
7679 pure module function fpd_get_draw_against_y2(this) result(x)
7680 class(filled_plot_data), intent(in) :: this
7681 logical :: x
7682 end function
7683
7684 module subroutine fpd_set_draw_against_y2(this, x)
7685 class(filled_plot_data), intent(inout) :: this
7686 logical, intent(in) :: x
7687 end subroutine
7688
7689 module function fpd_get_cmd(this) result(x)
7690 class(filled_plot_data), intent(in) :: this
7691 character(len = :), allocatable :: x
7692 end function
7693
7694 module function fpd_get_data_cmd(this) result(x)
7695 class(filled_plot_data), intent(in) :: this
7696 character(len = :), allocatable :: x
7697 end function
7698
7699 module subroutine fpd_define_data(this, x, y, yc, err)
7700 class(filled_plot_data), intent(inout) :: this
7701 real(real64), intent(in), dimension(:) :: x, y, yc
7702 class(errors), intent(inout), optional, target :: err
7703 end subroutine
7704 end interface
7705
7706! ******************************************************************************
7707! FPLOT_SIMPLIFY.F90
7708! ------------------------------------------------------------------------------
7786 interface simplify_polyline
7787 module procedure :: simplify_polyline_2d1
7788 module procedure :: simplify_polyline_3d1
7789 module procedure :: simplify_polyline_mtx
7790 end interface
7791
7792 interface
7793 module function simplify_polyline_2d1(x, y, tol, err) result(ln)
7794 real(real64), intent(in), dimension(:) :: x, y
7795 real(real64), intent(in) :: tol
7796 class(errors), intent(inout), optional, target :: err
7797 real(real64), allocatable, dimension(:,:) :: ln
7798 end function
7799
7800 module function simplify_polyline_3d1(x, y, z, tol, err) result(ln)
7801 real(real64), intent(in), dimension(:) :: x, y, z
7802 real(real64), intent(in) :: tol
7803 class(errors), intent(inout), optional, target :: err
7804 real(real64), allocatable, dimension(:,:) :: ln
7805 end function
7806
7807 module function simplify_polyline_mtx(xy, tol, err) result(ln)
7808 real(real64), intent(in), dimension(:,:) :: xy
7809 real(real64), intent(in) :: tol
7810 class(errors), intent(inout), optional, target :: err
7811 real(real64), allocatable, dimension(:,:) :: ln
7812 end function
7813 end interface
7814
7815! ------------------------------------------------------------------------------
7816end module
Retrieves a string from a plot_object.
Simplifies a 2D or 3D polyline by removing points too close to discern given a specified tolerance.
fplot_core
Constructs a linearly spaced array.
A colormap object for a surface plot.
Defines a colormap consisting of "cool" colors.
Defines a custom colormap that utilizes the FORCOLORMAP library to provide the map.
Provides a container for a 2D Delaunay triangulation.
Provides a type describing a triangulated surface.
Defines an earthy-colored colormap.
Defines a two-dimensional filled plot data set.
Defines a grey-scaled colormap.
Defines a colormap consisting of "hot" colors.
Defines a GNUPLOT LATEX terminal object.
Defines a legend object.
Defines a multi-plot layout.
Defines a colormap equivalent to the MATLAB parula colormap.
A plot object defining a 2D plot.
A plot object defining a 3D plot.
Defines an arrow to be used on by a plot object.
Describes a single plot axis.
Defines a 2D plot tailored towards bar plotting.
Defines a two-dimensional plot data set.
Defines a three-dimensional plot data set.
Defines a data set tailored to bar charts.
Defines a plot_data based object best represented by a color.
Defines a 2D error bar based data set.
A container for plotting data in the form of a histogram.
Defines a 2D triangulated data set.
Provides a container for plot data.
Defines a label object for a plot.
The base type for a GNUPLOT object.
Defines a 2D polar plot.
Defines the basic GNUPLOT plot.
Defines a GNUPLOT PNG terminal object.
Defines a GNUPLOT QT terminal object.
Defines a rainbow colormap.
A plot_data object for describing scatter plot data sets.
Provides a three-dimensional surface plot data set.
A plot object defining a 3D surface plot.
Defines a GNUPLOT terminal object.
Provides a three-dimensional surface plot data set constructed of triangulated points.
Defines a two-dimensional vector-field plot data set.
Defines a GNUPLOT Win32 terminal object.
Defines a GNUPLOT WXT terminal object.