From 2826b746a38d1f25394f0b13814634bb691f1882 Mon Sep 17 00:00:00 2001 From: Marlon Dassanayake Date: Thu, 3 Aug 2023 15:57:07 +0100 Subject: [PATCH] Rows numbers now correct on heatmap --- control/src/mercury/carrier/Carrier.py | 5 +++++ control/test/static/js/carrier.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/control/src/mercury/carrier/Carrier.py b/control/src/mercury/carrier/Carrier.py index 6d1adab..4ea673b 100644 --- a/control/src/mercury/carrier/Carrier.py +++ b/control/src/mercury/carrier/Carrier.py @@ -1084,6 +1084,7 @@ def create_reshaped_array(): self._segment_data = self._segment_data + reshaped + blank_segment = [[0] * 80]*4 try: @@ -1093,7 +1094,11 @@ def create_reshaped_array(): for segment in range(20): create_reshaped_array() else: + for i in range(0, segment): + self._segment_data = self._segment_data + blank_segment create_reshaped_array() + for i in range (segment+1, 20): + self._segment_data = self._segment_data + blank_segment self._segment_ready = True diff --git a/control/test/static/js/carrier.js b/control/test/static/js/carrier.js index 3a39361..ab7628a 100644 --- a/control/test/static/js/carrier.js +++ b/control/test/static/js/carrier.js @@ -1307,6 +1307,9 @@ function readout_output(segment_data) { if (all_segments_displayed) { layout["title"] = 'All Segments'; layout.coloraxis["colorbar"] = "v"; + } else { + layout.yaxis.autorange=false; + layout.yaxis.range=[first_row+3.5,first_row-0.5]; }; Plotly.newPlot('graph_output', data, layout, config);