<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_flux( flux, pos=None, state_sizes=None, flux_scale=1.0, state_scale=1.0, state_colors='#ff5500', state_labels='auto', minflux=1e-9, arrow_scale=1.0, arrow_curvature=1.0, arrow_labels='weights', arrow_label_format='%2.e', max_width=12, max_height=12, figpadding=0.2, attribute_to_plot='net_flux', show_frame=False, show_committor=True, ax=None, **textkwargs):
 r"""Network representation of reactive flux This visualization is not optimized for large fluxes. It is meant to be used for the visualization of small models with up to 10-20 states, e.g. obtained by a PCCA-based coarse-graining of the full flux. If used with large network, the automatic node positioning will be very slow and may still look ugly. Parameters flux : :class:`ReactiveFlux <pyemma.msm.flux.ReactiveFlux>` reactive flux object pos : ndarray(n,2), optional, default=None User-defined positions to draw the states on. If not given, will set the x coordinates equal to the committor probability and try to place the y coordinates automatically state_sizes : ndarray(n), optional, default=None User-defined areas of the discs drawn for each state. If not given, the stationary probability of P will be used flux_scale : float, optional, default=1.0 scaling of the flux values state_scale : float, optional, default=1.0 scaling of the state circles state_colors : string, ndarray(n), or list, optional, default='#ff5500' (orange) string : a Hex code for a single color used for all states array : n values in [0,1] which will result in a grayscale plot list : of len = nstates, with a color for each state. The list can mix strings, RGB values and hex codes, e.g. :py:obj:`state_colors` = ['g', 'red', [.23, .34, .35], '#ff5500'] is possible. state_labels : list of strings, optional, default is 'auto' A list with a label for each state, to be displayed at the center of each node/state. If left to 'auto', the labels are automatically set to the state indices. minflux : float, optional, default=1e-9 The minimal flux for a transition to be drawn arrow_scale : float, optional, default=1.0 Relative arrow scale. Set to a value different from 1 to increase or decrease the arrow width. arrow_curvature : float, optional, default=1.0 Relative arrow curvature. Set to a value different from 1 to make arrows more or less curved. arrow_labels : 'weights', None or a ndarray(n,n) with label strings. Optional, default='weights' Strings to be placed upon arrows. If None, no labels will be used. If 'weights', the elements of P will be used. If a matrix of strings is given by the user these will be used. arrow_label_format : str, optional, default='%10.2f' The numeric format to print the arrow labels max_width : int (default = 12) The maximum figure width max_height: int (default = 12) The maximum figure height figpadding: float (default = 0.2) The relative figure size used for the padding attribute_to_plot : str, optional, default='net_flux' specify the attribute of the flux object to plot. show_frame: boolean (default=False) Draw a frame around the network. show_committor: boolean (default=False) Print the committor value on the x-axis. ax : matplotlib Axes object, optional, default=None The axes to plot to. When set to None a new Axes (and Figure) object will be used. textkwargs : optional argument for the text of the state and arrow labels. See http://matplotlib.org/api/text_api.html#matplotlib.text.Text for more info. The parameter 'size' refers to the size of the state and arrow labels and overwrites the matplotlib default. The parameter 'arrow_label_size' is only used for the arrow labels; please note that 'arrow_label_size' is not part of matplotlib.text.Text's set of parameters and will raise an exception when passed to matplotlib.text.Text directly. Returns ------- (fig, pos) : matpotlib.Figure instance, ndarray Axes instances containing the plot. Use pyplot.show() to display it. The positions of states. Can be used later to plot a different network representation (e.g. the flux). Examples -------- We define first define a reactive flux by taking the following transition matrix and computing TPT from state 2 to 3 Scale the flux by 100 is basically a change of units to get numbers close to 1 (avoid printing many zeros). Now we visualize the flux: """

    from matplotlib import pylab as plt
    F = flux_scale * getattr(flux, attribute_to_plot)
    c = flux.committor
    if state_sizes is None:
        state_sizes = flux.stationary_distribution
    plot = NetworkPlot(F, pos=pos, xpos=c, ax=ax)
    if minflux > 0:
        I, J = _np.where(F < minflux)
        F[I, J] = 0.0

    if isinstance(state_labels, str) and state_labels == 'auto':
        # the first and last element correspond to A and B in ReactiveFlux
        state_labels = _np.array([str(i) for i in range(flux.nstates)])
        state_labels[_np.array(flux.A)] = "A"
        state_labels[_np.array(flux.B)] = "B"
    elif isinstance(state_labels, (_np.ndarray, list, tuple)):
        if len(state_labels) != flux.nstates:
            raise ValueError("length of state_labels({}) has to match length of states({})."
                             .format(len(state_labels), flux.nstates))

    fig = plot.plot_network(
        state_sizes=state_sizes, state_scale=state_scale, state_colors=state_colors,
        state_labels=state_labels, arrow_scale=arrow_scale, arrow_curvature=arrow_curvature,
        arrow_labels=arrow_labels, arrow_label_format=arrow_label_format, max_width=max_width,
        max_height=max_height, figpadding=figpadding, xticks=show_committor, yticks=False,
        show_frame=show_frame, **textkwargs)
    if show_committor:

        plt.xlabel('Committor probability')
    return fig, plot.pos