r"""Convenience routines for easily plotting with VisClaw."""

def interactive_plot(outdir='./_output',file_format='ascii'):
    """
    Convenience function for launching an interactive plotting session.
    """
    from visclaw import Iplotclaw
    ip=Iplotclaw.Iplotclaw()
    ip.plotdata.outdir=outdir
    ip.plotdata.format=file_format
    ip.plotloop()

def html_plot(outdir='./_output',file_format='ascii'):
    """
    Convenience function for creating html page with plots.
    """
    from visclaw import plotclaw
    plotclaw.plotclaw(outdir,format=file_format)

@@ -64,33 +64,39 @@
 def 
-interactive_plot(
+plot(setplot_path=None,
 outdir=
-'
+%22
 ./_o
@@ -92,34 +92,84 @@
 utdir=%22./_output
-',
+%22,plotdir=None,htmlplot=False,iplot=False,%0A         
 file_format='asc
@@ -175,162 +175,1109 @@
 cii'
+,**plot_kargs
 ):%0A    
+r%22
 %22%22%22
+%22%22
 %0A    
-Convenience function for launching an interactive plotting session.%0A    %22%22%22%0A    from visclaw import Iplotclaw%0A    ip=Iplotclaw.Iplotclaw()%0A
+%0A    # Construct a plot directory if not provided%0A    if plotdir is None:%0A        plotdir = os.path.join(os.path.split(outdir)%5B:-2%5D,%22_plots%22)%0A    %0A    if htmlplot or iplot:%0A        # Grab and import the setplot function%0A        if setplot_path is None:%0A            setplot_module = __import__(%22visclaw.setplot_default%22)%0A        else:%0A            path = os.path.abspath(os.path.expandvars(os.path.expanduser(setplot_path)))%0A            setplot_module_dir = os.path.dirname(path)%0A            setplot_module_name = os.path.splitext(os.path.basename(setplot_path))%5B0%5D%0A            sys.path.insert(0,setplot_module_dir)%0A        setplot_module = __import__(setplot_module_name)%0A        reload(setplot_module)%0A        setplot = lambda plotdata:setplot_module.setplot(plotdata,**plot_kargs)%0A        %0A        if not isinstance(setplot,types.FunctionType):%0A            raise ImportError(%22Failed to import %25s.setplot%22 %25 setplot_module_name)%0A        %0A        if iplot:%0A            from visclaw import Iplotclaw%0A        %0A            ip = Iplotclaw.Iplotclaw(setplot=setplot)%0A        
     
@@ -1298,16 +1298,26 @@
 tdir
-=
+ = 
 outdir%0A
+        
     
@@ -1330,25 +1330,27 @@
 tdata.format
-=
+ = 
 file_format%0A
@@ -1357,20 +1357,471 @@
     
-ip.plotloop(
+    %0A            ip.plotloop()%0A            %0A        if htmlplot:%0A            from visclaw import plotclaw            %0A            plotclaw.plotclaw(outdir,plotdir,format=file_format,setplot=setplot)%0A        %0A%0A# These now just point to the above more generic function%0Adef interactive_plot(outdir='./_output',file_format='ascii'):%0A    %22%22%22%0A    Convenience function for launching an interactive plotting session.%0A    %22%22%22%0A    plot(outdir=outdir,file_format=file_format
 )%0A%0Ad
@@ -1958,66 +1958,32 @@
     
-from visclaw import plotclaw%0A    plotclaw.plotclaw(
+plot(outdir=
 outdir,
+file_
 form

Add more generic plotting function to plot module