Skip to content

Commit

Permalink
fix reading of single-string settings in gui (thanks Salvador Salazar…
Browse files Browse the repository at this point in the history
… and Francesco Montesano)
  • Loading branch information
Antony Lewis committed Jul 17, 2015
1 parent 4d94dc3 commit 2c11e69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions getdist/gui/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def __init__(self, app, ini=None, base_dir=None):

if Dirs is None and lastDir:
Dirs = [lastDir]
elif isinstance(Dirs, six.string_types):
Dirs = [Dirs] # Qsettings doesn't save single item lists reliably
if Dirs is not None:
Dirs = [x for x in Dirs if os.path.exists(x)]
self.listDirectories.addItems(Dirs)
Expand Down
6 changes: 3 additions & 3 deletions getdist/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ def triangle_plot(self, roots, params=None, legend_labels=None, plot_3d_with_par
:param legend_ncol: The number of columns for the legend
:param legend_loc: The location for the legend
:param upper_roots: set to fill the upper triangle with subplots using this list of sample root names
(TODO: this needs some work easily without a lot of tweaking)
(TODO: this needs some work to easily work without a lot of tweaking)
:param upper_kwargs: list of dict for arguments when making upper-triangle 2D plots
:param kwargs: optional keyword arguments for :func:`~GetDistPlotter.plot_2d` or :func:`~GetDistPlotter.plot_3d` (lower triangle only)
Expand Down Expand Up @@ -2059,7 +2059,7 @@ class sampleNames(object): pass

def add_2d_scatter(self, root, x, y, color='k', alpha=1, extra_thin=1, scatter_size=None, ax=None):
"""
Adds a 2D sample scatter plot to the current axes (or ax if specified).
Low-level function to adds a 2D sample scatter plot to the current axes (or ax if specified).
:param root: The root name of the samples to use
:param param1: name of x parameter
Expand All @@ -2077,7 +2077,7 @@ def add_2d_scatter(self, root, x, y, color='k', alpha=1, extra_thin=1, scatter_s

def add_3d_scatter(self, root, params, color_bar=True, alpha=1, extra_thin=1, scatter_size=None, ax=None, **kwargs):
"""
Adds a 3D scatter plot to the current axes (or ax if specified).
Low-level function to add a 3D scatter plot to the current axes (or ax if specified).
:param root: The root name of the samples to use
:param params: list of parameters to plot
Expand Down

0 comments on commit 2c11e69

Please sign in to comment.