 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Iterative Plotting in Maple
| [MUG] Iterative Plotting in Maple |
|
Author: Gaurav Suri
Posted: 25/10/2000 19:54:34 GDT
|
>> From: Gaurav Suri
Hello,
I am using MAPLE to write code for an iterative algorithm. At the end
of each iteration, I want to plot a point (the result of the iteration) to a
separate window - so that I can see how the iteration is progressing.
I have figured out how to use the plotsetup command to send plots to
separate window, instead of inline. The problem is that at the end of every
iteration, when I send the plot command, it opens up a new plot window.
Is there some way to send subsequent plots to the same window?
I know I can use the display command, but am just wondering if an alternative
approach would be more elegant.
Any suggestions will be appreciated.
Thanks
--
Gaurav Suri, Graduate Research Associate
Integral Attachment Program at Ohio State
Phone: (614)292-2849(W), (614)431-2668 (H)
|
| [MUG] Re: Iterative Plotting in Maple |
|
Author: Maple Group
Posted: 31/10/2000 01:21:03 GMT
|
>> From: Maple Group
On Wed, 25 Oct 2000, Gaurav Suri wrote:
| I am using MAPLE to write code for an iterative algorithm. At the end
| of each iteration, I want to plot a point (the result of the iteration) to a
| separate window - so that I can see how the iteration is progressing.
| I have figured out how to use the plotsetup command to send plots to
| separate window, instead of inline. The problem is that at the end of every
| iteration, when I send the plot command, it opens up a new plot window.
| Is there some way to send subsequent plots to the same window?
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 26 Oct 2000 14:55:43 -0700 (PDT)
From: Robert Israel
To:
Subject: Iterative Plotting in Maple
No, once a plot is displayed new elements can't be added to
it. You can add new elements to a smartplot by drag-and-drop, but not by
Maple commands.
| I know I can use the display command, but am just wondering if an alternative
| approach would be more elegant.
To plot a sequence of points, you build up a list or array of points and
then plot it.
Well, maybe there's a way to accomplish what you want, but it will require
resources outside Maple. It's most likely to be feasible on a Unix
system. What you'd want to do is set up a pipe from Maple to some other
process that can do incremental plotting, reading in points from the pipe
as they become available and plotting them.
Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Mon, 30 Oct 2000 12:19:36 +0100
From: Barsuhn
Subject: Iterative Plotting in Maple
To:
Dear Gaurav,
it would be nice if this were possible, but so far it is not (to my
knowledge). After having left a plot statement you cannot reenter this
plot at a later occasion.
You already mentioned "display" that allows to circumvent the problem to
some extent.
The problem is (probably) that the plot-software of Maple has become
more and more "encapsulated" and primitive commands are (no longer)
accessible. As a student I enjoyed (among other things) to plot
potential curves of diatomic molecules with a frame of axis around. The
bottom axis in Bohr radii, the top axis in Angstroem, the left axis in
Hartree ans the right axis in electron Volts using a Calcomp plotter
with self.modified software. I wouldn't know how to do this in Maple (if
I had to).
This is probably part of a more general problem of a software producer:
Does he do research as his prime goal or does he wish to earn some
money. Maple is nowadays moving into the same direction as Mathematica.
But nevertheless I enjoy to use Maple and hence am carefully listening
to the heartbeat of my licence manager in order not to be cut off
unexpectedly.
All the best Jurgen
--
-------------------
Prof. Dr. Jurgen Barsuhn
Fachhochschule Bielefeld
University of Applied Sciences
Fachbereich Elektrotechnik und Informationstechnik
Wilhelm-Bertelsmann-Str. 10
D-33602 Bielefeld
-----------
|
| [MUG] Re: Iterative Plotting in Maple |
|
Author: Maple Group
Posted: 03/11/2000 13:35:09 GMT
|
>> From: Maple Group
On Wed, 25 Oct 2000, Gaurav Suri wrote:
| I am using MAPLE to write code for an iterative algorithm. At the end
| of each iteration, I want to plot a point (the result of the iteration) to a
| separate window - so that I can see how the iteration is progressing.
| I have figured out how to use the plotsetup command to send plots to
| separate window, instead of inline. The problem is that at the end of every
| iteration, when I send the plot command, it opens up a new plot window.
| Is there some way to send subsequent plots to the same window?
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Nathan Sokalski"
To:
Subject: Iterative Plotting in Maple
Date: Tue, 31 Oct 2000 10:48:44 EST
It sounds like what you want to do is write a procedure that will add the
points to your plot. You will probably want to do this using a global list
variable, where the procedure adds a single point and then graphs the points
in the list. If you need more help with procedures, see the help file.
Nathan Sokalski
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 31 Oct 2000 15:55:25 +0000 (GMT)
From: "J.B.W.Webber"
To:
Subject: Iterative Plotting in Maple
Yes it is indeed possible on a Unix/Linux box to plot and re-plot data as
Robert Israel suggests -
using Tim Budd's Apl compiler I run interactive code that
can either generate data that gnuplot displays or
generate postscript that can be displayed using ghostview or xv,
and printed to a postscript printer - see :
http://wwwnmr.ukc.ac.uk/~jbww/lab-tools/html/lab-tools.html
this works well, one just has to have code to spawn the graphers
initially, and then close them down before exiting.
cheers,
beau webber
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Wed, 1 Nov 2000 04:39:08 -0500 (EST)
From: Carl DeVore
To:
Subject: Iterative Plotting in Maple
If you have Matlab on the same computer this is easy. Here's an example.
> with(Matlab);
> evalM("figure");
> evalM("hold on");
The next proc returns at point [x, sin(x)] where x is chosen at random
form the interval 0..2*Pi. This is my example to substitute for your
"iterative algorithm".
> F:= proc()
> local x;
> x:= evalf(rand()*2*Pi/10^12);
> RETURN([x,sin(x)])
> end;
And this loop lets you see how the sine curve gradually fills in as
200 such points are chosen.
> to 200 do
> P:= F();
> evalM(cat("plot("
> ,convert(P[1],string), ","
> ,convert(P[2],string), ", '+')"
> )
> )
> end;
Carl Devore
University of Delaware
|
Previous by date: [MUG] undefined limits, Cesar Augusto De Freitas Anselmo
Next by date: [MUG] Runge Kutta order 4, Chuck Baker
Previous thread: [MUG] mvcal2 3rd party library., Jason C Leach
Next thread: [MUG] Runge Kutta order 4, Chuck Baker
|
|
|