Commit f28e1c45 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Geometry: Plot: Fix x axes.

Showing with 10 additions and 1 deletion
+10 -1
...@@ -52,6 +52,10 @@ class PlotKPC(APlot): ...@@ -52,6 +52,10 @@ class PlotKPC(APlot):
z_min = self.data.get_z_min() z_min = self.data.get_z_min()
z_max = self.data.get_z_max() z_max = self.data.get_z_max()
self.canvas.axes.set_xlim(
left = min(kp), right = max(kp)
)
self.line_kp_zmin_zmax = self.canvas.axes.vlines( self.line_kp_zmin_zmax = self.canvas.axes.vlines(
x=kp, x=kp,
ymin=z_min, ymax=z_max, ymin=z_min, ymax=z_max,
......
...@@ -52,6 +52,11 @@ class PlotXY(APlot): ...@@ -52,6 +52,11 @@ class PlotXY(APlot):
color='green', fontsize=12 color='green', fontsize=12
) )
kp = self.data.get_kp()
self.canvas.axes.set_xlim(
left = min(kp), right = max(kp)
)
# Draw line for each profile # Draw line for each profile
self.line_xy = [ self.line_xy = [
self.canvas.axes.plot( self.canvas.axes.plot(
...@@ -61,7 +66,7 @@ class PlotXY(APlot): ...@@ -61,7 +66,7 @@ class PlotXY(APlot):
) )
for x, y, kp in zip( for x, y, kp in zip(
self.data.get_x(), self.data.get_y(), self.data.get_x(), self.data.get_y(),
self.data.get_kp() kp
) )
] ]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment