File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -123,12 +123,23 @@ def generate_lineplot(
123123 replicates = np .stack (
124124 measurements_to_plot .data_to_plot .repl .values
125125 )
126+ # sorts according to ascending order of conditions
127+ cond , replicates = zip (
128+ * sorted (
129+ zip (
130+ measurements_to_plot .conditions ,
131+ replicates
132+ )
133+ )
134+ )
135+ replicates = np .stack (replicates )
136+
126137 if replicates .ndim == 1 :
127138 replicates = np .expand_dims (replicates , axis = 1 )
128139
129140 # plot first replicate
130141 p = ax .plot (
131- measurements_to_plot . conditions ,
142+ cond ,
132143 replicates [:, 0 ],
133144 linestyle = "-." ,
134145 marker = "x" ,
@@ -138,7 +149,7 @@ def generate_lineplot(
138149
139150 # plot other replicates with the same color
140151 ax .plot (
141- measurements_to_plot . conditions ,
152+ cond ,
142153 replicates [:, 1 :],
143154 linestyle = "-." ,
144155 marker = "x" ,
You can’t perform that action at this time.
0 commit comments