mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 16:40:42 +08:00
Merge pull request #484 from epasveer/482-array-visualizer-xy-axis-assignments-inverted-when-plotting-one-array-against-another
Fixed transposition in plotting.
This commit is contained in:
@@ -952,19 +952,19 @@ void SeerArrayVisualizerWidget::handleDataChanged () {
|
|||||||
_aSeries->setPointLabelsVisible(false);
|
_aSeries->setPointLabelsVisible(false);
|
||||||
_aSeries->setPointLabelsClipping(true);
|
_aSeries->setPointLabelsClipping(true);
|
||||||
|
|
||||||
const QVector<double>& xvalues = arrayTableWidget->aArrayValues();
|
const QVector<double>& avalues = arrayTableWidget->aArrayValues();
|
||||||
const QVector<double>& yvalues = arrayTableWidget->bArrayValues();
|
const QVector<double>& bvalues = arrayTableWidget->bArrayValues();
|
||||||
|
|
||||||
if (arrayTableWidget->aAxis() == "Y" && arrayTableWidget->bAxis() == "X") {
|
if (arrayTableWidget->aAxis() == "X" && arrayTableWidget->bAxis() == "Y") {
|
||||||
|
|
||||||
for (int i = 0; i < std::min(xvalues.size(),yvalues.size()); ++i) {
|
for (int i = 0; i < std::min(avalues.size(),bvalues.size()); ++i) {
|
||||||
_aSeries->append(xvalues[i], yvalues[i]);
|
_aSeries->append(avalues[i], bvalues[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if (arrayTableWidget->aAxis() == "X" && arrayTableWidget->bAxis() == "Y") {
|
}else if (arrayTableWidget->aAxis() == "Y" && arrayTableWidget->bAxis() == "X") {
|
||||||
|
|
||||||
for (int i = 0; i < std::min(xvalues.size(),yvalues.size()); ++i) {
|
for (int i = 0; i < std::min(avalues.size(),bvalues.size()); ++i) {
|
||||||
_aSeries->append(yvalues[i], xvalues[i]);
|
_aSeries->append(bvalues[i], avalues[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
hello482
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
all: hello482
|
||||||
|
|
||||||
|
hello482: hello482.cpp
|
||||||
|
g++ -g -o hello482 hello482.cpp
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -f hello482 hello482.o
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
break -source /nas/erniep/Development/seer/tests/hello482/hello482.cpp -line 15
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
|
||||||
|
double a[100];
|
||||||
|
double b[100];
|
||||||
|
|
||||||
|
for (int i=0; i<100; i++) {
|
||||||
|
|
||||||
|
a[i] = i;
|
||||||
|
b[i] = i*i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"seerproject": {
|
||||||
|
"executable": "hello482",
|
||||||
|
"postgdbcommands": [
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"pregdbcommands": [
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"startmode": {
|
||||||
|
"arguments": "",
|
||||||
|
"breakatfirstinstruction": false,
|
||||||
|
"breakinfunction": false,
|
||||||
|
"breakinfunctionname": "",
|
||||||
|
"breakinmain": true,
|
||||||
|
"breakpointsfile": "/nas/erniep/Development/seer/tests/hello482/breakpoints.seer",
|
||||||
|
"nobreak": false,
|
||||||
|
"nonstopmode": false,
|
||||||
|
"randomizestartaddress": false,
|
||||||
|
"showassemblytabmode": "auto"
|
||||||
|
},
|
||||||
|
"symbolfile": "",
|
||||||
|
"workingdirectory": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user