Skip to content

Commit 989bf0b

Browse files
committed
added the load checkbox for creating plots
1 parent bb8a8f2 commit 989bf0b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

psyplot_gui/plot_creator.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,6 +1671,12 @@ def __init__(self, *args, **kwargs):
16711671
self.array_table = ArrayTable(self.get_ds, parent=w)
16721672
self.array_table.setup_from_ds(plot_method=self.pm_combo.currentText())
16731673

1674+
self.cbox_load = QCheckBox('load')
1675+
self.cbox_load.setToolTip(
1676+
'Load the selected data arrays into memory when clicking on '
1677+
'<em>Ok</em>. Note that this might cause problems for large '
1678+
'arrays!')
1679+
16741680
self.cbox_close_popups = QCheckBox('close dropdowns', w)
16751681
self.cbox_close_popups.setChecked(True)
16761682
self.cbox_close_popups.setToolTip(
@@ -1697,7 +1703,7 @@ def __init__(self, *args, **kwargs):
16971703
self.rows_axis_label = QLabel('No. of rows', w)
16981704
self.rows_axis_edit = QLineEdit(w)
16991705
self.rows_axis_edit.setText('1')
1700-
self.cols_axis_label = QLabel('No. of columns', w)
1706+
self.cols_axis_label = QLabel('No. sof columns', w)
17011707
self.cols_axis_edit = QLineEdit(w)
17021708
self.cols_axis_edit.setText('1')
17031709
self.max_axis_label = QLabel('No. of axes per figure', w)
@@ -1813,6 +1819,7 @@ def __init__(self, *args, **kwargs):
18131819

18141820
self.tree_box = QHBoxLayout()
18151821
self.tree_box.addStretch(0)
1822+
self.tree_box.addWidget(self.cbox_load)
18161823
self.tree_box.addWidget(self.cbox_close_popups)
18171824
self.tree_box.addWidget(self.cbox_use_coords)
18181825
self.tree_box.addWidget(self.bt_remove_all)
@@ -1964,7 +1971,8 @@ def create_plots(self):
19641971
kwargs = {}
19651972
fig_nums = plt.get_fignums()[:]
19661973
try:
1967-
pm(self.ds, arr_names=names, **kwargs)
1974+
pm(self.ds, arr_names=names, load=self.cbox_load.isChecked(),
1975+
**kwargs)
19681976
except Exception:
19691977
for num in set(plt.get_fignums()).difference(fig_nums):
19701978
plt.close(num)

0 commit comments

Comments
 (0)