Package dataplot :: Package R :: Class Plot
[show private | hide private]
[frames | no frames]

Type Plot

 object --+    
          |    
GenericPlot --+
              |
             Plot

Known Subclasses:
barplot, Histogram, multi_time_series, NormalQQPlot, Scatter, ThereAndBackPlot, TimeSeries

R plot for the web.

Uses the rpy package and base R graphics. The idea is separation of R and python code, so each subclass needs to map to an R function (r_fun_name) in a .R code file (r_code_filename) that can be sourced and used for plotting by rpy.
Method Summary
  __init__(self, *args, **kwargs)
Infer default values at init.
  check_files_for_function(self)
Go through files looking for the plot function.
  get_data_file(self)
  get_r_fun(self, e)
Try to get the R function from the r environment.
  get_test_file(self)
  makefile(self)
Start a PDF device and execute R plotting code.
  save_data(self)
Save result of call to get_plot_args in Rdata.
  set_r_args(self)
  source_for_function(self)
Source R code files looking for fun_name.
    Inherited from GenericPlot
  __repr__(self)
  convert(self)
Convert from PDF to other formats using ImageMagick.
  do_chgrp(self)
Change group write perms if requested.
  do_chgrp_on(self, fn)
  from_filename(self)
  from_url(self)
  get_app_dirs(self)
Dig through settings.INSTALLED_APPS for full paths.
  get_filenames(self)
Return dictionary of image filenames.
  get_full_base(self)
  get_plot_args(self)
Gather input data from defaults and return value of tocall.
  get_urls(self)
Return dictionary of image URLs.
  makedirs(self)
Make subdirectories of media/ for this plot.
  makefiles(self)
Make initial file and conversions.
  prefix(self, pre)
Generalized form of url/filename reporting.
  render_html(self, tfile)
Render a HTML template with self as context 'plot'.
  to_html(self)
Render the PNG image and link to the PDF.
  to_html_nolink(self)
Render the PNG without link to PDF.
  to_html_thumb(self)
Render the PNG thumb.
  view(self)
Use some other program to look at rendered source image.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
str convert_from = 'pdf'
dict convert_to = {'pdf': {'suffix': '.pdf'}, 'thumb': {'conv...
float h = 6.5                                                                   
str view_program = 'xpdf'
int w = 9                                                                     
    Inherited from GenericPlot
bool autosave = False
NoneType chgrp = None                                                                  
str convert_binary = 'convert'
bool enable_caching = False

Method Details

__init__(self, *args, **kwargs)
(Constructor)

Infer default values at init.
Overrides:
dataplot.GenericPlot.__init__

check_files_for_function(self)

Go through files looking for the plot function.

get_r_fun(self, e=None)

Try to get the R function from the r environment.

Returns true if it worked.

makefile(self)

Start a PDF device and execute R plotting code.

Also executes the conversion to other formats.

save_data(self)

Save result of call to get_plot_args in Rdata.

source_for_function(self)

Source R code files looking for fun_name.

Raise error if fun_name is never found.

Class Variable Details

convert_from

Type:
str
Value:
'pdf'                                                                  

convert_to

Type:
dict
Value:
{'pdf': {'suffix': '.pdf'},
 'png': {'suffix': '.png'},
 'thumb': {'convert_args': '-resize 65x90', 'suffix': '-thumb.png'}}   

h

Type:
float
Value:
6.5                                                                   

view_program

Type:
str
Value:
'xpdf'                                                                 

w

Type:
int
Value:
9                                                                     

Generated by Epydoc 2.1 on Tue Apr 29 23:35:17 2008 http://epydoc.sf.net