<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: package dataplot</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>dataplot</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/__init__.py">/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/__init__.py</a></font></td></tr></table>
<p><tt>Make data-driven plots on the web using your Django data.<br>
<br>
This module contains only the core file management backend. Plotting<br>
code is found in dataplot.*, where * is one of {R,matplotlib,etc.}</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="dataplot.R.html"><strong>R</strong> (package)</a><br>
<a href="dataplot.autosave.html">autosave</a><br>
<a href="dataplot.bike.html"><strong>bike</strong> (package)</a><br>
</td><td width="25%" valign=top><a href="dataplot.matplotlib.html"><strong>matplotlib</strong> (package)</a><br>
<a href="dataplot.models.html">models</a><br>
<a href="dataplot.plotmodels.html">plotmodels</a><br>
</td><td width="25%" valign=top><a href="dataplot.python.html"><strong>python</strong> (package)</a><br>
<a href="dataplot.shellscript.html"><strong>shellscript</strong> (package)</a><br>
<a href="dataplot.soccer.html"><strong>soccer</strong> (package)</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="dataplot.html#GenericPlot">GenericPlot</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="dataplot.html#PlotError">PlotError</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="GenericPlot">class <strong>GenericPlot</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Singular representation of a plot for the web.<br>
<br>
Subclasses need to define:<br>
<br>
convert_to: dictionary that defines associated file suffixes, i.e.<br>
convert_to={<br>
'png':{'suffix':'.png'},<br>
'thumb':{'suffix':'-thumb.png','convert_args':'-resize 65x90'},<br>
'pdf':{'suffix':'.pdf'},<br>
}<br>
<br>
convert_from: one of the keys from convert_to, which specifies<br>
which of the files is created by the makefile method.<br>
<br>
makefile: a method that creates the image specified by<br>
convert_from on the filesystem.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="GenericPlot-__init__"><strong>__init__</strong></a>(self, basename, tocall, **kwargs)</dt><dd><tt>Make a new plot to display.<br>
<br>
Required args: (no sensible defaults)<br>
<br>
basename: basename of this plot (no .pdf)<br>
tocall: makes data dict to pass to the function for plotmaking.<br>
<br>
Other plot parameters may be specified after instantiation as<br>
attributes:<br>
<br>
enable_caching: should the image be remade every time?<br>
chgrp: group to set write permissions for</tt></dd></dl>
<dl><dt><a name="GenericPlot-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="GenericPlot-convert"><strong>convert</strong></a>(self)</dt><dd><tt>Convert from PDF to other formats using ImageMagick.</tt></dd></dl>
<dl><dt><a name="GenericPlot-do_chgrp"><strong>do_chgrp</strong></a>(self)</dt><dd><tt>Change group write perms if requested.<br>
<br>
This is useful if your testing and production webservers have<br>
different users but share the same media directory.</tt></dd></dl>
<dl><dt><a name="GenericPlot-do_chgrp_on"><strong>do_chgrp_on</strong></a>(self, fn)</dt></dl>
<dl><dt><a name="GenericPlot-from_filename"><strong>from_filename</strong></a>(self)</dt></dl>
<dl><dt><a name="GenericPlot-from_url"><strong>from_url</strong></a>(self)</dt></dl>
<dl><dt><a name="GenericPlot-get_app_dirs"><strong>get_app_dirs</strong></a>(self)</dt><dd><tt>Dig through settings.INSTALLED_APPS for full paths.</tt></dd></dl>
<dl><dt><a name="GenericPlot-get_filenames"><strong>get_filenames</strong></a>(self)</dt><dd><tt>Return dictionary of image filenames.</tt></dd></dl>
<dl><dt><a name="GenericPlot-get_full_base"><strong>get_full_base</strong></a>(self)</dt></dl>
<dl><dt><a name="GenericPlot-get_plot_args"><strong>get_plot_args</strong></a>(self)</dt><dd><tt>Gather input data from defaults and return value of tocall.<br>
<br>
1. defaults for this plot type<br>
2. returned arguments from get_plot_args</tt></dd></dl>
<dl><dt><a name="GenericPlot-get_urls"><strong>get_urls</strong></a>(self)</dt><dd><tt>Return dictionary of image URLs.<br>
<br>
Make the plot if it doesn't exist or caching is off.</tt></dd></dl>
<dl><dt><a name="GenericPlot-makedirs"><strong>makedirs</strong></a>(self)</dt><dd><tt>Make subdirectories of media/ for this plot.</tt></dd></dl>
<dl><dt><a name="GenericPlot-makefiles"><strong>makefiles</strong></a>(self)</dt><dd><tt>Make initial file and conversions.<br>
<br>
makefile() just makes the initial file.</tt></dd></dl>
<dl><dt><a name="GenericPlot-prefix"><strong>prefix</strong></a>(self, pre)</dt><dd><tt>Generalized form of url/filename reporting.<br>
<br>
pre: prefix to attach to the basename and suffix.</tt></dd></dl>
<dl><dt><a name="GenericPlot-render_html"><strong>render_html</strong></a>(self, tfile)</dt><dd><tt>Render a HTML template with self as context 'plot'.</tt></dd></dl>
<dl><dt><a name="GenericPlot-to_html"><strong>to_html</strong></a>(self)</dt><dd><tt>Render the PNG image and link to the PDF.</tt></dd></dl>
<dl><dt><a name="GenericPlot-to_html_nolink"><strong>to_html_nolink</strong></a>(self)</dt><dd><tt>Render the PNG without link to PDF.</tt></dd></dl>
<dl><dt><a name="GenericPlot-to_html_thumb"><strong>to_html_thumb</strong></a>(self)</dt><dd><tt>Render the PNG thumb.</tt></dd></dl>
<dl><dt><a name="GenericPlot-view"><strong>view</strong></a>(self)</dt><dd><tt>Use some other program to look at rendered source image.<br>
<br>
Will make the source image if it does not exist yet.</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = <dictproxy object><dd><tt>dictionary for instance variables (if defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of 'GenericPlot' objects><dd><tt>list of weak references to the <a href="__builtin__.html#object">object</a> (if defined)</tt></dl>
<dl><dt><strong>autosave</strong> = False</dl>
<dl><dt><strong>chgrp</strong> = None</dl>
<dl><dt><strong>convert_binary</strong> = 'convert'</dl>
<dl><dt><strong>enable_caching</strong> = False</dl>
<dl><dt><strong>view_program</strong> = 'display'</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="PlotError">class <strong>PlotError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="PlotError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
<dl><dt><a name="PlotError-__init__"><strong>__init__</strong></a>(...)</dt></dl>
<dl><dt><a name="PlotError-__str__"><strong>__str__</strong></a>(...)</dt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>settings</strong> = <django.conf.LazySettings object></td></tr></table>
</body></html>