diff --git a/moose-gui/mplot.py b/moose-gui/mplot.py
index f198c4b7402e438f4d1b5fa8686bf1e8d09b50af..7d753928d4ef36cb23d33f1790dda22d5a5083e7 100644
--- a/moose-gui/mplot.py
+++ b/moose-gui/mplot.py
@@ -6,9 +6,9 @@
# Maintainer:
# Created: Mon Mar 11 20:24:26 2013 (+0530)
# Version:
-# Last-Updated: Wed Jul 3 10:32:35 2013 (+0530)
-# By: subha
-# Update #: 309
+# Last-Updated: Wed Apr 11 15:32:35 2018 (+0530)
+# By: Harsha
+# Update #:
# URL:
# Keywords:
# Compatibility:
@@ -23,7 +23,7 @@
#
# Change log:
-#
+# 2018 April 11: In chemical model, now pool can be ploted as number or concentration.
#
#
#
@@ -153,8 +153,16 @@ class CanvasWidget(FigureCanvas):
# print "Mouse Position : ", pos
modelRoot, element = event.mimeData().data
if isinstance (element,moose.PoolBase):
- tablePath = moose.utils.create_table_path(self.model, self.graph, element, "Conc")
- table = moose.utils.create_table(tablePath, element, "Conc","Table2")
+ plotType = "Conc"
+ msgBox = QtGui.QMessageBox()
+ msgBox.setText('What to plot?')
+ msgBox.addButton(QtGui.QPushButton('Number'), QtGui.QMessageBox.YesRole)
+ msgBox.addButton(QtGui.QPushButton('Concentration'), QtGui.QMessageBox.NoRole)
+ ret = msgBox.exec_()
+ if ret == 0:
+ plotType = "N"
+ tablePath = moose.utils.create_table_path(self.model, self.graph, element, plotType)
+ table = moose.utils.create_table(tablePath, element, plotType,"Table2")
# moose.connect(table, 'requestOut', element, 'getConc')
self.updateSignal.emit()
elif isinstance(element, moose.CompartmentBase):
diff --git a/moose-gui/plugins/kkitViewcontrol.py b/moose-gui/plugins/kkitViewcontrol.py
index 9f947cd9e9f0c09439ea135aa1864ebb1b2ae191..255de61208a6e0c6d736098979c4fd582b74c707 100644
--- a/moose-gui/plugins/kkitViewcontrol.py
+++ b/moose-gui/plugins/kkitViewcontrol.py
@@ -432,8 +432,20 @@ class GraphicalView(QtGui.QGraphicsView):
moose.Neutral(self.modelRoot+'/data')
moose.Neutral(self.modelRoot+'/data/graph_0')
self.graph = moose.element(self.modelRoot+'/data/graph_0')
+ plotType = "Conc"
+ msgBox = QtGui.QMessageBox()
+ msgBox.setText('What to plot?')
+ msgBox.addButton(QtGui.QPushButton('Number'), QtGui.QMessageBox.YesRole)
+ msgBox.addButton(QtGui.QPushButton('Concentration'), QtGui.QMessageBox.NoRole)
+ ret = msgBox.exec_()
+ if ret == 0:
+ plotType = "N"
+ tablePath = moose.utils.create_table_path(moose.element(self.modelRoot), self.graph, element, plotType)
+ table = moose.utils.create_table(tablePath, element, plotType,"Table2")
+ '''
tablePath = utils.create_table_path(moose.element(self.modelRoot), self.graph, element, "Conc")
table = utils.create_table(tablePath, element, "Conc","Table2")
+ '''
self.layoutPt.plugin.view.getCentralWidget().plotWidgetContainer.plotAllData()
reply = QtGui.QMessageBox.information(self, "plot Object","Plot is added to Graph1",
QtGui.QMessageBox.Ok)
diff --git a/moose-gui/plugins/modelBuild.py b/moose-gui/plugins/modelBuild.py
index 25579bfd3d113a03b0dbf29b348d4f800f4079d9..260c8aff23f0c745c2cd6d42a618bba13abebc7e 100644
--- a/moose-gui/plugins/modelBuild.py
+++ b/moose-gui/plugins/modelBuild.py
@@ -5,7 +5,7 @@ __version__ = "1.0.0"
__maintainer__ = "HarshaRani"
__email__ = "hrani@ncbs.res.in"
__status__ = "Development"
-__updated__ = "Jul 27 2017"
+__updated__ = "Apr 11 2018"
import moose
from kkitQGraphics import *
@@ -137,14 +137,17 @@ def checkCreate(scene,view,modelpath,mobj,string,ret_string,num,event_pos,layout
#moose.connect( funcObj, 'valueOut', mobj ,'setN' )
poolclass = ["ZombieBufPool","BufPool"]
comptclass = ["CubeMesh","cyclMesh"]
+
if mobj.className in poolclass:
funcParent = layoutPt.mooseId_GObj[element(mobj.path)]
elif mobj.className in comptclass:
funcParent = layoutPt.qGraCompt[moose.element(mobj)]
posWrtComp = funcParent.mapFromScene(pos).toPoint()
#posWrtComp = (itemAtView.mapFromScene(pos)).toPoint()
+ elif mobj.className in "Neutral":
+ funcParent = layoutPt.qGraGrp[element(mobj)]
+
qGItem = FuncItem(funcObj,funcParent)
- #print " function ", posWrtComp.x(),posWrtComp.y()
qGItem.setDisplayProperties(posWrtComp.x(),posWrtComp.y(),QtGui.QColor('red'),QtGui.QColor('green'))
layoutPt.mooseId_GObj[funcObj] = qGItem
#if mType == "new_kkit":
@@ -273,7 +276,7 @@ def createObj(scene,view,modelpath,string,pos,layoutPt):
ret_string,num = findUniqId(mobj,string,num)
elif string == "Function":
- mobj = findCompartment(mobj)
+ #mobj = findCompartment(mobj)
ret_string,num = findUniqId(mobj,string,num)
'''
if itemAt != None: