civil-tools-v 0.0.4__py3-none-any.whl → 0.0.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- CivilTools/FigureGenerator/SeismicReport/Drift.py +28 -1
- {civil_tools_v-0.0.4.dist-info → civil_tools_v-0.0.5.dist-info}/METADATA +1 -1
- {civil_tools_v-0.0.4.dist-info → civil_tools_v-0.0.5.dist-info}/RECORD +6 -6
- {civil_tools_v-0.0.4.dist-info → civil_tools_v-0.0.5.dist-info}/LICENSE +0 -0
- {civil_tools_v-0.0.4.dist-info → civil_tools_v-0.0.5.dist-info}/WHEEL +0 -0
- {civil_tools_v-0.0.4.dist-info → civil_tools_v-0.0.5.dist-info}/top_level.txt +0 -0
@@ -32,6 +32,9 @@ class DriftPlotter(SeismicPlotter):
|
|
32
32
|
self._ax2_x = 1 / np.array(seismic_x)
|
33
33
|
self._ax2_y = 1 / np.array(seismic_y)
|
34
34
|
|
35
|
+
def set_limit(self, limit: float):
|
36
|
+
self.__limit = limit
|
37
|
+
|
35
38
|
def plot(self):
|
36
39
|
if self.__limit:
|
37
40
|
self.__plot_limit()
|
@@ -55,8 +58,32 @@ class DriftPlotter(SeismicPlotter):
|
|
55
58
|
self.axes[i].set_yticks(self._y_major_ticks)
|
56
59
|
self.axes[i].set_yticks(self._y_minor_ticks, minor=True)
|
57
60
|
x_ticks = GetTicks(xmaxs[i])
|
61
|
+
x_ticks = self.__shrink_x_ticks(x_ticks)
|
58
62
|
self.axes[i].set_xticks(x_ticks)
|
59
|
-
|
63
|
+
X_ticklabels = [0] + ["1/%d" % (1 / s) for s in x_ticks[1:]]
|
64
|
+
self.axes[i].set_xticklabels(X_ticklabels)
|
65
|
+
|
66
|
+
def __shrink_x_ticks(self, x_ticks):
|
67
|
+
if len(x_ticks) <= 4:
|
68
|
+
return x_ticks
|
69
|
+
new_x_ticks = []
|
70
|
+
for i in range(len(x_ticks)):
|
71
|
+
if i % 2 == 0:
|
72
|
+
new_x_ticks.append(x_ticks[i])
|
73
|
+
return new_x_ticks
|
74
|
+
|
75
|
+
def __plot_limit(self):
|
76
|
+
limitation = self.__limit
|
77
|
+
for ax in self.axes:
|
78
|
+
ax.vlines(
|
79
|
+
x=1 / limitation,
|
80
|
+
ymin=0,
|
81
|
+
ymax=self.floor_num,
|
82
|
+
color="r",
|
83
|
+
linewidth=3,
|
84
|
+
ls="--",
|
85
|
+
label=f"限值1/{limitation}",
|
86
|
+
)
|
60
87
|
|
61
88
|
def __add_titles(self):
|
62
89
|
self.axes[0].set_ylabel(self.y_label)
|
@@ -12,7 +12,7 @@ CivilTools/FigureGenerator/BasicPNGPlotter.py,sha256=7PjRuArFc4y-NYy6WQCyfkpCahV
|
|
12
12
|
CivilTools/FigureGenerator/BasicPltPlotter.py,sha256=DNuBgg5qwi0kbttrNLcnAr1G1rYNunNCOaLwc5_8dzk,4002
|
13
13
|
CivilTools/FigureGenerator/StairCalculationSheetPNGPlotter.py,sha256=iVOEY3MXu7x9D1d3W6fofPCUOHaR06lT9CsssNGqeBI,200
|
14
14
|
CivilTools/FigureGenerator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
CivilTools/FigureGenerator/SeismicReport/Drift.py,sha256=
|
15
|
+
CivilTools/FigureGenerator/SeismicReport/Drift.py,sha256=DSP1i3FxbvIyKVAYJyze1UmAMNqQSv0WpGzwZfMFYOQ,3250
|
16
16
|
CivilTools/FigureGenerator/SeismicReport/ShearMassRatio.py,sha256=XpmPA9PeRED4Xzl_5LgJVgm9jEHuTda2GAFs5zMfVP8,2731
|
17
17
|
CivilTools/FigureGenerator/SeismicReport/ShearMoment.py,sha256=dYa4SK20u6MJXDsLAkpGk8t2U2tu3bEmBheu5D5nHek,2660
|
18
18
|
CivilTools/FigureGenerator/SeismicReport/__init__.py,sha256=QPYbo9DvhHmTwccgcZfsV7_TWephS_F44xbWgry9WXg,129
|
@@ -54,8 +54,8 @@ CivilTools/YDBLoader/SQLiteConnector/Connector.py,sha256=Yw0A0buUfrQDEHYNfvUNy-N
|
|
54
54
|
CivilTools/YDBLoader/SQLiteConnector/RowDataFactory.py,sha256=CRStFrV9ac2bi_R1CB6LW4_MrXhMtfyOFWgrT31PkI4,1537
|
55
55
|
CivilTools/YDBLoader/SQLiteConnector/YDBTableName.py,sha256=Ab5SdIx7v-gO_MfJmwSkp9HeATi3BK58zWuZi812qeI,4624
|
56
56
|
CivilTools/YDBLoader/SQLiteConnector/__init__.py,sha256=0WWCCdLvlX0Rp-CjcVQc9oQ2b770Zd5TcMGxWBtToS4,116
|
57
|
-
civil_tools_v-0.0.
|
58
|
-
civil_tools_v-0.0.
|
59
|
-
civil_tools_v-0.0.
|
60
|
-
civil_tools_v-0.0.
|
61
|
-
civil_tools_v-0.0.
|
57
|
+
civil_tools_v-0.0.5.dist-info/LICENSE,sha256=nq3TNN3UrfULANUGIRvaZAI1jUn6HlYeLxIRjJvDxCc,1088
|
58
|
+
civil_tools_v-0.0.5.dist-info/METADATA,sha256=kmkyz6LlkjAyLWvvHj7cnR63IWDw72HQN6ZHv6y2Nc4,6184
|
59
|
+
civil_tools_v-0.0.5.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
60
|
+
civil_tools_v-0.0.5.dist-info/top_level.txt,sha256=AP0ng4FJ3z78LnGOjUzZaGRMMp-lDtw91Rlia8z--wM,11
|
61
|
+
civil_tools_v-0.0.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|