kill(all)$

maxima:programming, different plots on the same canvas ,version 1.0
peter.vlasschaert@gmail.com,17/05/2020

def:gauss function : mean = 0,σ = x1^(1/2)
================================

f(x1,y1):=1/(2*π*x1)^(1/2)*exp(-y1^2/(2*x1));

 ===============================

rem : x1: t 'time'
          y1: x 'space'

plot : f(0.1,x)
==========

wxplot2d([f(0.1,x)], [x,-5,5])$

plot:f(0.1*i,x) , i=1,2, different :canvas
============================

for i:1 thru 2 do(
wxplot2d([f(0.1*i,x)], [x,-5,5])
);

plot:f(0.1*i,x) , i=1,2, different plots : same canvas
=======================================

step  0:f(x1,y1) ,see 'above'
=====================

f(t,x);

step 1: x values to plot
==================

x:makelist(-5+i,i,0,10,.1);

length(x); /*number of elements in the list x*/

step 2: empty lisy
=============

m:[];

step 3:values of t for x-ranges
=======================

n:10; /*number of plots on the same canvas*/

t:makelist(0.1*ii,ii,1,n);

step 4:list of discrete plots, ' different t values = t[i] '
=======================================

for i:1 thru n do(
    y:f(t[i],x),
    m:endcons([discrete,x,y],m)
);

m[1]$

step 5: plot of the 'm' list
==================

wxplot2d(m);

build : function :'multiploti'
===================

multiploti(nu,g,xx,mx,tt,st):=block([m1:[]],
    xq:makelist(xx+mx,mx,0,10,0.1),
    tt:makelist(st*jj,jj,1,nu),  /*parameter*/
    for ii:1 thru nu do
                               (
        tq:tt[ii],
        yq:g(tq,xq),                              
        m1:endcons([discrete,xq,yq],m1)
                                 ),
        wxplot2d(m1)
)$
    

grind(multiploti);

multiploti(10,f,-5,0.1,t,0.1);

help :multiploti
===========

 ============================================

           nu : number of plots
           f   : function two variables ,see : example below
           xx  :xmin  value
           mx :step values : x -direction
           tt    : list of fixed values
           st   : fixed value to start,for tt values
============================================

----------------------------------------------------------------------------------------------------------------------------------------------------------

other example :multiploti
==================

def : function 
------------------

gg(x1,y1):= sin(x1*y1);

plot :gg
----------

multiploti(10,gg,-5,0.1,t,0.1);

-------------------------------------------------------------------------------------------------------------------------------------------------