Skip to content

Commit

Permalink
fix #2097 xlimit bug introduced with commit f5289e3
Browse files Browse the repository at this point in the history
  • Loading branch information
nikohansen committed Apr 21, 2022
1 parent 6294fda commit 4a6cc23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 1 addition & 3 deletions code-postprocessing/cocopp/compall/pprldmany.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
PlotType = ppfig.enum('ALG', 'DIM', 'FUNC')

displaybest = True
x_limit = genericsettings.xlimit_pprldmany
divide_by_dimension = True
annotation_line_end_relative = 1.065 # lines between graph and annotation, was 1.11, see also subplots_adjust
annotation_space_end_relative = 1.21 # figure space end relative to x_limit, space is however determined rather by subplots_adjust(...) below!?
Expand Down Expand Up @@ -211,8 +212,6 @@ def plotdata(data, maxval=None, maxevals=None, CrE=0., **kwargs):
:param kwargs: optional arguments provided to plot function.
"""
x_limit = genericsettings.xlimit_pprldmany

# Expect data to be a ndarray.
x = data[np.isnan(data) == False] # Take away the nans
nn = len(x)
Expand Down Expand Up @@ -597,7 +596,6 @@ def main(dictAlg, order=None, outputdir='.', info='default',
"""
global divide_by_dimension # not fully implemented/tested yet
x_limit = genericsettings.xlimit_pprldmany

tmp = pp.dictAlgByDim(dictAlg)
algorithms_with_data = [a for a in dictAlg.keys() if dictAlg[a] != []]
Expand Down
4 changes: 2 additions & 2 deletions code-postprocessing/cocopp/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def config(suite_name=None):
ppscatter.markersize = 16

else:
pass # here the default values of the modules apply
# pprlmany.x_limit = ...should depend on noisy/noiseless
# here the default values of the modules apply
pprldmany.x_limit = settings.xlimit_pprldmany # ...should depend on noisy/noiseless
if 11 < 3: # for testing purpose
if tbs.current_testbed:
# TODO: this case needs to be tested yet: the current problem is that no noisy data are in this folder
Expand Down
11 changes: 9 additions & 2 deletions code-postprocessing/cocopp/genericsettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@
single_runlength_factors = [0.5, 1.2, 3, 10] + [10 ** i for i in range(2, 12)] # used in pprldistr

xlimit_pprldmany = 1e7
"""maximal run length multiplier used in `pprldmany`, noisy: rather 1e8
maybe better: ``10 * genericsettings.evaluation_setting[1]``?"""
"""maximal run length multiplier used in `pprldmany`.
After a manual change like ``cocopp.genericsettings.xlimit_pprldmany =
1e5``, ``cocopp.config.config()`` needs to be called to "activate" the change.
Alternatively, we could also directly set
``cocopp.compall.pprldmany.x_limit = 1e5``.
Noisy setting should be rather 1e8?
?maybe better: ``10 * genericsettings.evaluation_setting[1]``?"""
xlimit_expensive = 1e3
"""maximal run length multiplier in expensive setting, used in config for
`pprldmany` and `ppfigdim`"""
Expand Down

0 comments on commit 4a6cc23

Please sign in to comment.