cocopp.ppfig
module documentationcocopp
Class | Usage | Undocumented |
Function | enum | Undocumented |
Function | save_figure | Save figure into an image file. |
Function | add_image | Undocumented |
Function | add_link | Undocumented |
Function | save_index_html_file | Undocumented |
Function | save_folder_index_file | Undocumented |
Function | get_home_link | Undocumented |
Function | get_convergence_link | Undocumented |
Function | get_rld_link | Undocumented |
Function | get_parent_link | Undocumented |
Function | save_single_functions_html | Undocumented |
Function | write_dimension_links | Undocumented |
Function | write_tables | Undocumented |
Function | copy_js_files | Copies js files to output directory. |
Function | discretize_limits | return new limits with discrete values in k * 10**i with k in [1, 3]. |
Function | marker_positions | return randomized marker positions |
Function | plotUnifLogXMarkers | Proxy plot function: markers are evenly spaced on the log x-scale |
Function | consecutiveNumbers | Groups a sequence of integers into ranges of consecutive numbers. If the prefix is set then the it's placed before each number. |
Function | groupByRange | 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 | beautify | deprecated method - not used anywhere Customize a figure by adding a legend, axis label, etc. |
Function | generateData | Returns an array of results to be plotted. |
Function | plot | From a DataSetList, plot a graph. Not in use and superseeded by ppfigdim.main!? |
Function | get_first_html_file | Undocumented |
Function | get_sorted_html_files | Undocumented |
Class | PlottingStyle | Undocumented |
Function | get_plotting_styles | Undocumented |
Function | getFontSize | Undocumented |
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.
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.
return randomized marker positions
replacement for downsample, could be improved by becoming independent of axis limits?
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.
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").
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.
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.