6 module function pdt2d_get_data_cmd(this) result(x)
8 class(plot_data_tri_2d),
intent(in) :: this
9 character(len = :),
allocatable :: x
12 type(string_builder) :: str
13 integer(int32) :: i, j, n
14 character :: delimiter, nl
18 n =
size(this%m_indices, 1)
29 j = this%m_indices(i, 1)
30 call str%append(to_string(this%m_x(j)))
31 call str%append(delimiter)
32 call str%append(to_string(this%m_y(j)))
33 call str%append(delimiter)
34 call str%append(
"0.0")
38 j = this%m_indices(i, 2)
39 call str%append(to_string(this%m_x(j)))
40 call str%append(delimiter)
41 call str%append(to_string(this%m_y(j)))
42 call str%append(delimiter)
43 call str%append(
"0.0")
49 j = this%m_indices(i, 2)
50 call str%append(to_string(this%m_x(j)))
51 call str%append(delimiter)
52 call str%append(to_string(this%m_y(j)))
53 call str%append(delimiter)
54 call str%append(
"0.0")
59 j = this%m_indices(i, 3)
60 call str%append(to_string(this%m_x(j)))
61 call str%append(delimiter)
62 call str%append(to_string(this%m_y(j)))
63 call str%append(delimiter)
64 call str%append(
"0.0")
70 j = this%m_indices(i, 3)
71 call str%append(to_string(this%m_x(j)))
72 call str%append(delimiter)
73 call str%append(to_string(this%m_y(j)))
74 call str%append(delimiter)
75 call str%append(
"0.0")
79 j = this%m_indices(i, 1)
80 call str%append(to_string(this%m_x(j)))
81 call str%append(delimiter)
82 call str%append(to_string(this%m_y(j)))
83 call str%append(delimiter)
84 call str%append(
"0.0")
95 x = char(str%to_string())
99 module function pdt2d_get_cmd(this) result(x)
101 class(plot_data_tri_2d),
intent(in) :: this
102 character(len = :),
allocatable :: x
105 type(string_builder) :: str
110 call str%initialize()
113 n = len_trim(this%get_name())
115 call str%append(
' "-" title "')
116 call str%append(this%get_name())
119 call str%append(
' "-" notitle')
123 call str%append(
" with lines")
126 call str%append(
" lw ")
127 call str%append(to_string(this%get_line_width()))
130 clr = this%get_line_color()
131 call str%append(
' lc rgb "#')
132 call str%append(clr%to_hex_string())
136 call str%append(
" lt ")
137 call str%append(to_string(this%get_line_style()))
138 if (this%get_line_style() /= line_solid)
then
139 call str%append(
" dashtype ")
140 call str%append(to_string(this%get_line_style()))
144 x = char(str%to_string())
148 module subroutine pdt2d_define_data(this, tri)
150 class(plot_data_tri_2d),
intent(inout) :: this
151 class(delaunay_tri_2d),
intent(in) :: tri
154 if (
allocated(this%m_x))
deallocate(this%m_x)
155 if (
allocated(this%m_y))
deallocate(this%m_y)
156 if (
allocated(this%m_indices))
deallocate(this%m_indices)
158 this%m_x = tri%get_points_x()
159 this%m_y = tri%get_points_y()
160 this%m_indices = tri%get_indices()
164 pure module function pdt2d_get_line_width(this) result(rst)
165 class(plot_data_tri_2d),
intent(in) :: this
167 rst = this%m_lineWidth
171 module subroutine pdt2d_set_line_width(this, x)
172 class(plot_data_tri_2d),
intent(inout) :: this
173 real(real32),
intent(in) :: x
175 this%m_lineWidth = 1.0d0
181 pure module function pdt2d_get_line_style(this) result(rst)
182 class(plot_data_tri_2d),
intent(in) :: this
183 integer(int32) :: rst
184 rst = this%m_lineStyle
188 module subroutine pdt2d_set_line_style(this, x)
189 class(plot_data_tri_2d),
intent(inout) :: this
190 integer(int32),
intent(in) :: x
191 if (x == line_dashed .or. &
192 x == line_dash_dotted .or. &
193 x == line_dash_dot_dot .or. &
194 x == line_dotted .or. &
195 x == line_solid)
then