Beispiel #1
0
# Show the max/min value
xmin = 0
xmax = xvalues
ymin = 0
ymax = delta * len(data)

# The overall dimensions
xdim = 3.0
xscale = xdim / (2 * xvalues)

ydim = 1.5
yscale = ydim / ymax

# Get the header info
s = tkz.get_header()
s += tkz.get_begin_tikz(xdim=3.5, ydim=2.0, xunit='in', yunit='in')

# Create the plot background
for y in yticks:
    s += tkz.get_2d_plot([xmin, xmax], [y, y],
                         xscale=xscale,
                         yscale=yscale,
                         color='gray',
                         line_dim='thin',
                         xmin=xmin,
                         xmax=xmax,
                         ymin=ymin,
                         ymax=ymax)

for y in np.linspace(0, delta * (len(data) - 1), len(data)):
Beispiel #2
0
    # Set legend parameters
    length = 0.15
    xlegend = 2.0
    
    # Set the positions of the tick locations
    yticks = [0, 0.25, 0.5, 0.75, 1.0]
    xticks = [ 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5 ]

    ylabel_offset = 0.15
    length = 0.15
    ylegend = 0.025 + len(heuristics)*0.06
    xlegend = 3.5

    # Get the header info
    s = tikz.get_header()
    s += tikz.get_begin_tikz(xdim=2, ydim=2, xunit='in', yunit='in')

    # Plot the axes
    s += tikz.get_2d_axes(xmin, xmax, ymin, ymax,
                          tick_frac=tick_frac, ylabel_offset=ylabel_offset,
                          xscale=xscale, yscale=yscale,
                          xticks=xticks, yticks=yticks,
                          xlabel='$\\alpha$', ylabel='Fraction of problems')

    for k in xrange(len(heuristics)):
        tau, rho = get_performance_profile(r[:, k], 1.5*xmax)
        s += tikz.get_2d_plot(tau, rho, xscale=xscale, yscale=yscale,
                              color=colors[k], line_dim='ultra thick',
                              xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax,
                              symbol=None)