gpkit.interactive package

Submodules

gpkit.interactive.plot_sweep module

Implements plot_sweep1d function

gpkit.interactive.plot_sweep.assign_axes(var, posys, axes)

Assigns axes to posys, creating and formatting if necessary

gpkit.interactive.plot_sweep.format_and_label_axes(var, posys, axes, ylabel=True)

Formats and labels axes

gpkit.interactive.plot_sweep.plot_1dsweepgrid(model, sweeps, posys, origsol=None, tol=0.01, **solveargs)

Creates and plots a sweep from an existing model

Example usage: f, _ = plot_sweep_1d(m, {‘x’: np.linspace(1, 2, 5)}, ‘y’) f.savefig(‘mysweep.png’)

gpkit.interactive.plotting module

Plotting methods

gpkit.interactive.plotting.compare(models, sweeps, posys, tol=0.001)

Compares the values of posys over a sweep of several models.

If posys is of the same length as models, this will plot different variables from different models.

Currently only supports a single sweepvar.

Example Usage: compare([aec, fbc], {“R”: (160, 300)},

[“cost”, (“W_{rm batt}”, “W_{rm fuel}”)], tol=0.001)
gpkit.interactive.plotting.plot_convergence(model)

Plots the convergence of a signomial programming model

model: Model
Signomial programming model that has already been solved
matplotlib.pyplot Figure
Plot of cost as functions of SP iteration #

gpkit.interactive.sankey module

gpkit.interactive.widgets module

Module contents

Module for the interactive and plotting functions of GPkit