   Convenience method to get or set axis properties.
   """
   def axis_set(v, kwargs \\ []) do
-    code = Codebuilder.build_code(funcname: "plt.axis", nonnamed: [v], named: kwargs)
-    Server.Commapi.add_code code
+    Codebuilder.build_code(funcname: "plt.axis", nonnamed: [v], named: kwargs) |> Server.Commapi.add_code
   end
 
   @doc """

  Draws arrow on specified axis from (x, y) to (x + dx, y + dy). Uses FancyArrow patch to construct the arrow.
  """
  def arrow(x, y, dx, dy, opts \\ [hold: nil], kwargs \\ []) do
    code = Codebuilder.build_code(funcname: "plt.arrow", nonnamed: [x, y, dx, dy], named: opts ++ kwargs)
    Server.Commapi.add_code code
  end

  @doc """

  (left, right, bottom and top edges).
  """
  def bar(left, height, opts \\ [width: 0.8, bottom: nil, hold: nil, data: nil], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.bar", nonnamed: [left, height], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Plot a 2-D field of barbs.
  """
  def barbs(opts \\ [], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.barbs", nonnamed: [], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Make a horizontal bar plot.

  Make a horizontal bar plot with rectangles bounded by: <i>left</i>, <i>left + width</i>, <i>bottom</i>, <i>bottom + height</i>

  (lft, right, bottom and top edges).

  <i>bottom, width, height</i>, and <i>left</i> can be either scalars or sequences
  """
  def barh(bottom, width, opts \\ [height: 0.8, left: nil, hold: nil], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.barh", nonnamed: [bottom, width], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Set the default colormap to bone and apply to current image if any.
  """
  def bone do
    Codebuilder.build_code(funcname: "plt.bone", nonnamed: [], named: []) |> Server.Commapi.add_code
  end

  @doc """
  Make a box and whisker plot.

  Make a box and whisker plot for each column of <i>x</i> or each vector in sequence <i>x</i>. The box extends from the lower to upper quartile values
  of the data, with a line at the median. The whiskers extend from the box to show the range of the data. Flier points are those past the end
  of the whiskers.
  """
  def boxplot(x, opts \\ [notch: nil, sym: nil, vert: nil, whis: nil, positions: nil, widths: nil, patch_artist: nil, bootstrap: nil, usermedians: nil,
                          conf_intervals: nil, meanline: nil, showmeans: nil, showcaps: nil, showbox: nil, showfliers: nil, boxprops: nil, labels: nil,
                          flierprops: nil, medianprops: nil, meanprops: nil, capprops: nil, whiskerprops: nil, manage_xticks: true, autorange: false,
                          zorder: nil, hold: nil, data: nil]) do
    Codebuilder.build_code(funcname: "plt.boxplot", nonnamed: [x], named: opts) |> Server.Commapi.add_code
  end

  @doc """
  Plot horizontal bars.

  A collection of horizontal bars spanning <i>yrange</i> with a sequence of <i>xranges</i>.
  """
  def broken_barh(xranges, yrange, opts \\ [hold: nil, data: nil], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.broken_barh", nonnamed: [xranges, yrange], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Clear the current axes.
  """
  def cla do
    Codebuilder.build_code(funcname: "plt.cla", nonnamed: [], named: []) |> Server.Commapi.add_code
  end

  @doc """
  Label a contour plot.
  """
  def clabel(cs, opts \\ [], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.clabel", nonnamed: [cs], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Clear the current figure.
  """
  def clf do
    Codebuilder.build_code(funcname: "plt.clf", nonnamed: [], named: []) |> Server.Commapi.add_code
  end

  @doc """
  Set the color limits of the current image.

  To apply clim to all axes images do:
  ```elixir
  clim(0, 0.5)
  ```
  If either <i>vmin</i> or <i>vmax</i> is nil, the image min/max respectively will be used for color scaling.
  """
  def clim(opts \\ [vmin: nil, vmax: nil]) do
    Codebuilder.build_code(funcname: "plt.clim", nonnamed: [], named: opts) |> Server.Commapi.add_code
  end

  @doc """
  Close a figure window.

  <i>close()</i> by itself closes the current figure

  <i>close(num)</i> closes figure number <i>num</i>

  <i>close(name)</i> where <i>name</i> is a string, closes figure with that label

  <i>close(:all)</i> closes all the figure windows
  """
  def close(opts \\ []) do
    Codebuilder.build_code(funcname: "plt.close", nonnamed: opts) |> Server.Commapi.add_code
  end

  @doc """
  Plot the coherence between <i>x</i> and <i>y</i>.

  Plot the coherence between <i>x</i> and <i>y</i>. Coherence is the normalized cross spectral density.
  """
  def cohere(x, y, opts \\ [nfft: 256, fs: 2, fc: 0, noverlap: 0, pad_to: nil, sides: :default, scale_by_freq: nil, hold: nil, data: nil], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.cohere", nonnamed: [x, y], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Add a colorbar to a plot.
  """
  def colorbar(opts \\ [mappable: nil, cax: nil, ax: nil], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.colorbar", nonnamed: [], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  This is a do-nothing function to provide you with help on how matplotlib handles colors.
  """
  def colors do
    Codebuilder.build_code(funcname: "plt.colors", nonnamed: [], named: []) |> Server.Commapi.add_code
  end

  @doc """
  Plot contours.

  contour() and contourf() draw contour lines and filled contours, respectively. Except as noted, function signatures and return values
  are the same for both versions.

  contourf() differs from the MATLAB version in that it does not draw the polygon edges. To draw edges, add line contours with calls to contour().
  """
  def contour(opts \\ [], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.contour", nonnamed: [], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Plot contours.

  contour() and contourf() draw contour lines and filled contours, respectively. Except as noted, function signatures and return values
  are the same for both versions.

  contourf() differs from the MATLAB version in that it does not draw the polygon edges. To draw edges, add line contours with calls to contour().
  """
  def contourf(opts \\ [], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.contourf", nonnamed: [], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Set the default colormap to cool and apply to current image if any.
  """
  def cool do
    Codebuilder.build_code(funcname: "plt.cool", nonnamed: [], named: []) |> Server.Commapi.add_code
  end

  @doc """
  Set the default colormap to copper and apply to current image if any.
  """
  def copper do
    Codebuilder.build_code(funcname: "plt.copper", nonnamed: [], named: []) |> Server.Commapi.add_code
  end

  @doc """
  Plot the cross-spectral density.
  """
  def csd(x, y, opts \\ [nfft: 256, fs: 2, fc: 0, noverlap: 0, pad_to: nil, sides: :default, scale_by_freq: nil, return_line: nil], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.csd", nonnamed: [x, y], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Remove an axes from the current figure. If <i>ax</i> doesn't exist, an error will be raised.
  """
  def delaxes(opts \\ []) do
    Codebuilder.build_code(funcname: "plt.delaxes", nonnamed: [], named: opts) |> Server.Commapi.add_code
  end

  @doc """
  Redraw the current figure.

  This is used to update a figure that has been altered, but not automatically re-drawn. If interactive mode is on (ion()), this should be only
  rarely needed, but there may be ways to modify the state of a figure without marking it as <i>stale</i>.
  """
  def draw do
    Codebuilder.build_code(funcname: "plt.draw", nonnamed: [], name: []) |> Server.Commapi.add_code
  end

  @doc """
  Plot an errorbar graph.

  Plot x versus y with error deltas in yerr and xerr. Vertical errorbars are plotted if yerr is not nil. Horizontal errorbars are plotted if xerr is
  not nil.

  x, y, xerr, and yerr can all be scalars, which plots a single error bar at x, y.
  """
  def errorbar(x, y, opts \\ [yerr: nil, xerr: nil, fmt: "", ecolor: nil, elinewidth: nil, capsize: nil, barsabove: false, lolims: false, uplims: false,
                              xlolims: false, xuplims: false, errorevery: 1, capthick: nil, hold: nil, data: nil], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.errorbar", nonnamed: [x, y], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
  Plot identical parallel lines at specific positions.

  Plot parallel lines at the given <i>positions</i>. <i>positions</i> should be a 1D or 2D array-like object, with each row corresponding to a row or
  column of lines.

  This type of plot is commonly used in neuroscience for representing neural events, where it is commonly called a spike raster, dot raster, or raster plot.

  However, it is useful in any situation where you wish to show the timing or position of multiple sets of discrete events, such as the arrival
  times of people to a business on each day of the month or the date of hurricanes each year of the last century.
  """
  def eventplot(positions, opts \\ [orientation: :horizontal, lineoffsets: 1, linelengths: 1, linewidths: nil, colors: nil, linestyles: :solid,
                                    hold: nil, data: nil], kwargs \\ []) do
    Codebuilder.build_code(funcname: "plt.eventplot", nonnamed: [positions], named: opts ++ kwargs) |> Server.Commapi.add_code
  end

  @doc """
