Menu

[r124]: / trunk / docs / htdocs / pydoc / dataplot.autosave.html  Maximize  Restore  History

Download this file

130 lines (114 with data), 7.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module dataplot.autosave</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="dataplot.html"><font color="#ffffff">dataplot</font></a>.autosave</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/autosave.pyc">/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/autosave.pyc</a></font></td></tr></table>
<p><tt>Auto-update&nbsp;mechanism&nbsp;for&nbsp;django-dataplot&nbsp;images.<br>
&nbsp;<br>
Use:<br>
from&nbsp;dataplot.cache&nbsp;import&nbsp;<a href="#PlotModel">PlotModel</a><br>
from&nbsp;django.db&nbsp;import&nbsp;models<br>
class&nbsp;YourModel(<a href="#PlotModel">PlotModel</a>,models.Model):</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="dataplot.html">dataplot</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="pdb.html">pdb</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</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.autosave.html#PlotModel">PlotModel</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="dataplot.html#PlotError">dataplot.PlotError</a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="dataplot.autosave.html#DataplotImproperlyConfigured">DataplotImproperlyConfigured</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>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="DataplotImproperlyConfigured">class <strong>DataplotImproperlyConfigured</strong></a>(<a href="dataplot.html#PlotError">dataplot.PlotError</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="dataplot.autosave.html#DataplotImproperlyConfigured">DataplotImproperlyConfigured</a></dd>
<dd><a href="dataplot.html#PlotError">dataplot.PlotError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="DataplotImproperlyConfigured-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
<dl><dt><a name="DataplotImproperlyConfigured-__init__"><strong>__init__</strong></a>(...)</dt></dl>
<dl><dt><a name="DataplotImproperlyConfigured-__str__"><strong>__str__</strong></a>(...)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="PlotModel">class <strong>PlotModel</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Enables&nbsp;figure&nbsp;autosave&nbsp;with&nbsp;Django-dataplot.<br>
&nbsp;<br>
Specify&nbsp;which&nbsp;plots&nbsp;you&nbsp;want&nbsp;to&nbsp;remake&nbsp;by&nbsp;defining&nbsp;an&nbsp;init_plots<br>
method&nbsp;of&nbsp;your&nbsp;models&nbsp;subclass.&nbsp;Also&nbsp;make&nbsp;sure&nbsp;your&nbsp;subclass<br>
inherits&nbsp;from&nbsp;this&nbsp;class&nbsp;first,&nbsp;i.e.<br>
&nbsp;<br>
class&nbsp;Location(<a href="#PlotModel">PlotModel</a>,models.Model):<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="PlotModel-__init__"><strong>__init__</strong></a>(self, *posargs, **kwargs)</dt></dl>
<dl><dt><a name="PlotModel-init_dataplot"><strong>init_dataplot</strong></a>(self, plot)</dt><dd><tt>Initialize&nbsp;a&nbsp;dataplot&nbsp;using&nbsp;sensible&nbsp;defaults.<br>
&nbsp;<br>
This&nbsp;can&nbsp;be&nbsp;a<br>
&nbsp;<br>
dataplot&nbsp;(subclass&nbsp;of&nbsp;dataplot.GenericPlot,&nbsp;i.e.&nbsp;R.Scatter)&nbsp;in<br>
this&nbsp;case,&nbsp;we&nbsp;assume&nbsp;basename&nbsp;of&nbsp;scatter&nbsp;and&nbsp;a&nbsp;plot&nbsp;method<br>
called&nbsp;get_scatter_args.<br>
&nbsp;<br>
tuple&nbsp;(dataplot,dict)&nbsp;where&nbsp;dict&nbsp;is&nbsp;a&nbsp;dictionary&nbsp;of&nbsp;kwargs<br>
used&nbsp;to&nbsp;initialize&nbsp;the&nbsp;dataplot.&nbsp;So&nbsp;you&nbsp;can&nbsp;use&nbsp;this&nbsp;form&nbsp;if<br>
you&nbsp;want&nbsp;to&nbsp;override&nbsp;the&nbsp;default&nbsp;basename,&nbsp;get_plot_args<br>
method,&nbsp;or&nbsp;other&nbsp;plot&nbsp;parameters.</tt></dd></dl>
<dl><dt><a name="PlotModel-make_plots"><strong>make_plots</strong></a>(self)</dt><dd><tt>Try&nbsp;to&nbsp;remake&nbsp;plots&nbsp;related&nbsp;to&nbsp;this&nbsp;instance.<br>
&nbsp;<br>
This&nbsp;includes&nbsp;plots&nbsp;which&nbsp;are&nbsp;attributes&nbsp;of&nbsp;this&nbsp;model,&nbsp;and<br>
model-level&nbsp;plots&nbsp;which&nbsp;are&nbsp;attributes&nbsp;of&nbsp;this&nbsp;model's<br>
manager.</tt></dd></dl>
<dl><dt><a name="PlotModel-save"><strong>save</strong></a>(self)</dt><dd><tt>Save&nbsp;method&nbsp;which&nbsp;allows&nbsp;for&nbsp;maximum&nbsp;configurability.<br>
&nbsp;<br>
On&nbsp;a&nbsp;model&nbsp;with&nbsp;no&nbsp;custom&nbsp;save&nbsp;method,&nbsp;we&nbsp;will&nbsp;call&nbsp;django's<br>
save&nbsp;first,&nbsp;then&nbsp;try&nbsp;to&nbsp;make&nbsp;plots&nbsp;for&nbsp;this&nbsp;<a href="__builtin__.html#object">object</a>.<br>
&nbsp;<br>
On&nbsp;a&nbsp;model&nbsp;with&nbsp;a&nbsp;custom&nbsp;save&nbsp;method,&nbsp;you&nbsp;should&nbsp;call<br>
make_plots&nbsp;and&nbsp;Model.save&nbsp;yourself,&nbsp;depending&nbsp;on&nbsp;when&nbsp;it&nbsp;is<br>
appropriate&nbsp;in&nbsp;terms&nbsp;of&nbsp;your&nbsp;data&nbsp;processing.</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = &lt;dictproxy object&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of 'PlotModel' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;(if&nbsp;defined)</tt></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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>UNSAFE_FILE_CHARS</strong> = &lt;_sre.SRE_Pattern object&gt;</td></tr></table>
</body></html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.