Generic routines for figure generation.
Class |
|
Undocumented |
Exception |
|
Undocumented |
Function | add |
Undocumented |
Function | add |
Undocumented |
Function | beautify |
deprecated method - not used anywhere Customize a figure by adding a legend, axis label, etc. |
Function | consecutive |
Groups a sequence of integers into ranges of consecutive numbers. If the prefix is set then the it's placed before each number. |
Function | copy |
Copies js files to output directory. |
Function | discretize |
return new limits with discrete values in k * 10**i with k in [1, 3]. |
Function | enum |
Undocumented |
Function | format |
format an html text line by appending the <br> tag (was: by the <H3> tag) |
Function | generate |
Returns an array of results to be plotted. |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | get |
Undocumented |
Function | group |
Groups a sequence of integers into ranges of consecutive numbers. |
Function | logxticks |
Modify log-scale figure xticks from 10^i to i for values with the limits and (re-)sets the current xlim() thereby turning autoscale off (if it was on). |
Function | marker |
return randomized marker positions |
Function | plot |
From a DataSetList, plot a graph. Not in use and superseeded by ppfigdim.main!? |
Function | plot |
Proxy plot function: markers are evenly spaced on the log x-scale |
Function | save |
Save figure into an image file. |
Function | save |
Undocumented |
Function | save |
Undocumented |
Function | save |
Undocumented |
Function | write |
Undocumented |
Function | write |
Undocumented |
Variable | convergence |
Undocumented |
Variable | html |
Undocumented |
Variable |
|
Undocumented |
Variable | links |
Undocumented |
Variable | pprldmany |
Undocumented |
Variable | pprldmany |
Undocumented |
Variable | _figsize |
remaining number of warnings to be issued |
Undocumented
Groups a sequence of integers into ranges of consecutive numbers. If the prefix is set then the it's placed before each number.
- Example::
>>> import os >>> import cocopp >>> returnpath = os.getcwd() # needed for no effect on other doctests >>> os.chdir(cocopp.toolsdivers.path_in_package()) >>> cocopp.ppfig.consecutiveNumbers([0, 1, 2, 4, 5, 7, 8, 9]) '0-2, 4, 5, 7-9' >>> cocopp.ppfig.consecutiveNumbers([0, 1, 2, 4, 5, 7, 8, 9], 'f') 'f0-f2, f4, f5, f7-f9' >>> os.chdir(returnpath) # no effect on path from this doctest
Range of consecutive numbers is at least 3 (therefore [4, 5] is represented as "4, 5").
return new limits with discrete values in k * 10**i with k in [1, 3].
limits
has len 2 and the new lower limit is always 10**-0.2.
if limits[1] / limits[0] < 10**smaller_steps_limits
, k == 3 is an
additional choice.
Returns an array of results to be plotted.
1st column is ert, 2nd is the number of success, 3rd the success rate, 4th the sum of the number of function evaluations, and finally the median on successful runs.
Groups a sequence of integers into ranges of consecutive numbers.
Helper function of consecutiveNumbers(data), returns a list of lists. The key to the solution is differencing with a range so that consecutive numbers all appear in same group. Useful for determining ranges of functions. Ref: http://docs.python.org/release/3.0.1/library/itertools.html
Modify log-scale figure xticks from 10^i to i for values with the limits and (re-)sets the current xlim() thereby turning autoscale off (if it was on).
This is to have xticks that are more visible. Modifying the x-limits of the figure after calling this method will not update the ticks. Please make sure the xlabel is changed accordingly.
return randomized marker positions
replacement for downsample, could be improved by becoming independent of axis limits?
From a DataSetList, plot a graph. Not in use and superseeded by ppfigdim.main!?
Proxy plot function: markers are evenly spaced on the log x-scale
Remark/TODO: should be called plot_with_unif_markers!? Here is where the ECDF plot "done in pprldmany" actually happens.
This method generates plots with markers regularly spaced on the x-scale whereas the matplotlib.pyplot.plot function will put markers on data points.
This method outputs a list of three lines.Line2D objects: the first with the line style, the second for the markers and the last for the label.
This function only works with monotonous graph.
Save figure into an image file.
format
is a str
denoting a file type known to pylab.savefig
, like
"svg", or None
in which case the defaults from genericsettings
are
applied.
If layout_rect
, the pylab.tight_layout
method is invoked with
matplotlib version < 3.
subplots_adjust
contains keyword arguments to call the matplotlib
function with the same name with matplotlib version >= 3. The function
grants relative additional space of size bottom, left, 1 - top, and
1 - right by shrinking the printed axes. It is used to prevent outside
text being cut away.
'tight' bbox_inches
lead possibly to (slightly) different figure
sizes in each case, which is undesirable.
Undocumented