From 68e719ae973ae6859fdd389f170b5e146e5455ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E5=86=AC=E5=8D=AB?= Date: Sun, 2 Apr 2023 10:50:30 +0800 Subject: [PATCH] modify 2023-04-02 --- QT/PLT2.ui | 196 +++++++++++++++++++++++++++++++++++++++++++++++++++++ test2.py | 10 +-- well.txt | 6 ++ 3 files changed, 207 insertions(+), 5 deletions(-) create mode 100644 QT/PLT2.ui create mode 100644 well.txt diff --git a/QT/PLT2.ui b/QT/PLT2.ui new file mode 100644 index 0000000..2dee90b --- /dev/null +++ b/QT/PLT2.ui @@ -0,0 +1,196 @@ + + + Form + + + + 0 + 0 + 871 + 766 + + + + + 8 + 0 + + + + Form + + + + + + + + + + + + + + + 1 + 0 + + + + 数据名: + + + + + + + + 2 + 0 + + + + 请输入数据名,如data1.pos,data.pos + + + + + + + + + + + + 1 + 0 + + + + gWeight: + + + + + + + 15 + + + + + + + + + + + + 1 + 0 + + + + levels: + + + + + + + + 36 + 20 + + + + 5 + + + QAbstractSpinBox::AdaptiveDecimalStepType + + + 14 + + + + + + + + + + + + 1 + 0 + + + + 井文件: + + + + + + + + 2 + 0 + + + + 请输入井文件名,如well.txt + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 绘图 + + + + + + + + + + + + + + + + + 0 + 0 + + + + + + + + + + + diff --git a/test2.py b/test2.py index 5db7a46..758fef2 100644 --- a/test2.py +++ b/test2.py @@ -93,12 +93,12 @@ class MainWindow(QMainWindow): ax.quiver(points[i][0], points[i][1], contours_p[i][0] - points[i][0], contours_p[i][1] - points[i][1], angles='xy', scale=1.03, scale_units='xy', width=0.002, zorder=len(data_name)+1) # 绘制箭头 - ax.text(points[i][0] * 1 / 9 + contours_p[i][0] * 8 / 9 + min_distance[i] / 20, - points[i][1] * 1 / 9 + contours_p[i][1] * 8 / 9 - min_distance[i] / 20, f'{round(min_distance[i], 2)}', - fontdict={'size': '10', 'color': 'g'}) # 标出距离 ax.text(points[i][0] * 1 / 2 + contours_p[i][0] * 1 / 2 + min_distance[i] / 20, - points[i][1] * 1 / 2 + contours_p[i][1] * 1 / 2 - min_distance[i] / 20, - r'$\theta$=' f'{round(wells.angle[i], 2)}', fontdict={'size': '10', 'color': 'y'}) # 标出角度 + points[i][1] * 1 / 2 + contours_p[i][1] * 1 / 2 - min_distance[i] / 20, f'{round(min_distance[i], 2)}', + fontdict={'size': '10', 'color': 'g'}) # 标出距离 + # ax.text(points[i][0] * 1 / 2 + contours_p[i][0] * 1 / 2 + min_distance[i] / 20, + # points[i][1] * 1 / 2 + contours_p[i][1] * 1 / 2 - min_distance[i] / 20, + # r'$\theta$=' f'{round(wells.angle[i], 2)}', fontdict={'size': '10', 'color': 'y'}) # 标出角度 self.canvas_adjust(fig) def scene_fig(self): diff --git a/well.txt b/well.txt new file mode 100644 index 0000000..bc3d528 --- /dev/null +++ b/well.txt @@ -0,0 +1,6 @@ +0 0 1 L40-5 +-184 -243 0 L40-4 +-258 178 0 L39-5 +188 -169 0 L41-5 +242 321 0 L40-6 +446 180 0 L41-6 \ No newline at end of file