Skip to content

Commit 6f978ba

Browse files
authored
Merge pull request #58 from MetaCell/plotShape
fix plotShape returning empty figure
2 parents dfafe66 + bcceb9a commit 6f978ba

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

netpyne_ui/netpyne_geppetto.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ def getNetPyNEShapePlot(self):
224224
fig = analysis.plotShape(showFig=False, **args)
225225
if fig==-1:
226226
return fig
227-
return ui.getSVG(fig)
227+
svgs = []
228+
svgs.append(ui.getSVG(fig))
229+
return svgs.__str__()
228230

229231
def getNetPyNEConnectionsPlot(self):
230232
args = self.getPlotSettings('plotConn')
@@ -346,17 +348,19 @@ def getAvailablePops(self):
346348
def getAvailableCellModels(self):
347349
cellModels = set([])
348350
for p in netParams.popParams:
349-
cm = netParams.popParams[p]['cellModel']
350-
if cm not in cellModels:
351-
cellModels.add(cm)
351+
if 'cellModel' in netParams.popParams[p]:
352+
cm = netParams.popParams[p]['cellModel']
353+
if cm not in cellModels:
354+
cellModels.add(cm)
352355
return cellModels
353356

354357
def getAvailableCellTypes(self):
355358
cellTypes = set([])
356359
for p in netParams.popParams:
357-
ct = netParams.popParams[p]['cellType']
358-
if ct not in cellTypes:
359-
cellTypes.add(ct)
360+
if 'cellType' in netParams.popParams[p]:
361+
ct = netParams.popParams[p]['cellType']
362+
if ct not in cellTypes:
363+
cellTypes.add(ct)
360364
return cellTypes
361365

362366
def getAvailableSections(self):

0 commit comments

Comments
 (0)