1
0
forked from IPKM/nmreval

handle graph export with empty data (#239); closes #233

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: IPKM/nmreval#239
This commit is contained in:
2024-02-07 18:58:18 +00:00
parent 881eff2770
commit 24640d374e
3 changed files with 44 additions and 31 deletions

View File

@ -183,6 +183,8 @@ class PlotItem(PlotDataItem):
brush = self.opts['symbolBrush']
if isinstance(brush, tuple):
self.opts['symbolcolor'] = brush
elif isinstance(brush, str):
self.opts['symbolcolor'] = int(f'0x{brush[1:3]}', 16), int(f'0x{brush[3:5]}', 16), int(f'0x{brush[5:7]}', 16)
else:
c = brush.color()
self.opts['symbolcolor'] = c.red(), c.green(), c.blue()
@ -340,7 +342,8 @@ class PlotItem(PlotDataItem):
opts = self.opts
item_dic = {
'x': x, 'y': y,
'x': x,
'y': y,
'name': opts.get('name', ''),
'symbolsize': opts['symbolSize'],
}