diff options
author | Fahim | 2015-07-15 15:41:17 +0530 |
---|---|---|
committer | Fahim | 2015-07-15 15:41:17 +0530 |
commit | 8c5a136f3abe1863e3274dad630d3b1748fcc736 (patch) | |
tree | 52b23d7c35eacfa916bf1fb8336e842d5c2e0069 | |
parent | 9351ec74209fa1a351c9346b6c88dc16cedd22c0 (diff) | |
parent | 4c27f5d44d88cdbcc96edde57bf40788ec4d38ab (diff) | |
download | eSim-8c5a136f3abe1863e3274dad630d3b1748fcc736.tar.gz eSim-8c5a136f3abe1863e3274dad630d3b1748fcc736.tar.bz2 eSim-8c5a136f3abe1863e3274dad630d3b1748fcc736.zip |
Merge pull request #41 from FOSSEE-Manipal/master
Added colours to plotting editor, fixed plotting bug, shifted logo
-rwxr-xr-x | src/frontEnd/Application.py | 1 | ||||
-rw-r--r-- | src/ngspiceSimulation/pythonPlotting.py | 24 |
2 files changed, 21 insertions, 4 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index a139a7bd..709670dc 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -99,6 +99,7 @@ class Application(QtGui.QMainWindow): self.logopic = QtGui.QPixmap(os.path.join(os.path.abspath('../..'),'images','fosseeLogo.png')) self.logopic = self.logopic.scaled(QSize(150,150),QtCore.Qt.KeepAspectRatio) self.logo.setPixmap(self.logopic) + self.logo.setStyleSheet("padding:0 0 0 15px;") self.topToolbar.addWidget(self.logo) #Left Tool bar Action Widget diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py index 00077e14..f746fae8 100644 --- a/src/ngspiceSimulation/pythonPlotting.py +++ b/src/ngspiceSimulation/pythonPlotting.py @@ -86,11 +86,19 @@ class plotWindow(QtGui.QMainWindow): self.chkbox.append(QtGui.QCheckBox(self.obj_dataext.NBList[i])) self.chkbox[i].setToolTip('<b>Check To Plot</b>' ) self.top_grid.addWidget(self.chkbox[i],i+2,0) + self.colorLab = QtGui.QLabel() + self.colorLab.setText('____') + self.colorLab.setStyleSheet(self.colorName(self.color[i])+'; font-weight = bold;') + self.top_grid.addWidget(self.colorLab,i+2,1) for i in range(self.a[1],self.a[0]-1):#a[0]-1 self.chkbox.append(QtGui.QCheckBox(self.obj_dataext.NBList[i])) self.chkbox[i].setToolTip('<b>Check To Plot</b>' ) self.top_grid.addWidget(self.chkbox[i],i+3,0) + self.colorLab = QtGui.QLabel() + self.colorLab.setText('____') + self.colorLab.setStyleSheet(self.colorName(self.color[i])+'; font-weight = bold;') + self.top_grid.addWidget(self.colorLab,i+3,1) self.clear = QtGui.QPushButton("Clear") self.warnning = QtGui.QLabel() @@ -374,9 +382,17 @@ class plotWindow(QtGui.QMainWindow): if boxCheck == 0: QtGui.QMessageBox.about(self,"Warning!!", "Please select atleast one Node OR Branch") self.canvas.draw() - - + def colorName(self,letter): + return { + 'r':'color:red', + 'b':'color:blue', + 'g':'color:green', + 'y':'color:yellow', + 'c':'color:cyan', + 'm':'color:magenta', + 'k':'color:black' + }[letter] class DataExtraction: @@ -413,7 +429,7 @@ class DataExtraction: #Finding totla number of voltage node for i in self.voltData[3:]: #it has possible names of voltage nodes in NgSpice - if "V(" in i or "x1" in i or "u3" in i: + if "Index" in i:#"V(" in i or "x1" in i or "u3" in i: vnumber+=1 #print "Voltage Number :",vnumber @@ -535,7 +551,7 @@ class DataExtraction: self.NBList.append(l) self.NBList=self.NBList[2:] len_NBList = len(self.NBList) - #print "NBLIST",self.NBList + print "NBLIST",self.NBList ivals=[] inum = len(allv[5].split("\t")) |