Adept Scientific - English
The world's best software for research, science and engineering.
flag arrow
clearclear
 

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKusdedksvnofi
Home
Products
Training
Consultancy
 Buy Online
Downloads
Education
Support
My Adept
International |  About Us |  Contact Us |  Press Room |  Jobs


The Next Steps

• Ask us a question
• Maple Product Tour
• Buy Maple Now
• View Maple Pricing
• Download a Brochure
• Request a Brochure
• Download a Demo
• Request a Demo
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 12 Professional
Maple 12 Academic
Maple 12 Student Use
Recorded Online Seminars
FREE Training Resources
Maple Application Briefs
Maple Adoption Program

MapleNet
Maple T.A.
MapleConnect
BlockImporter for Simulink
BlockBuilder for Simulink
Maple Toolboxes
Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

Latest Information

New Features: Professional
New Features: Academic
The Maple Reporter Online
Numerical Algorithms Group
(NAG)


Service & Support

Maple Primes
blogs, forums etc

Elite Maintenance Program
Application Centre
Powertools
Search the Knowledge Base
Technical Support request

List Archives >  Maple User Group List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[MUG] plotsetup in maplets!

Search email archive for  

[MUG] plotsetup in maplets!
Author: Avelino Sousa    Posted: Thu, 31 Oct 2002 04:37:56 +0000

>> From: "Avelino Sousa" "linosousa"

Hi,

I'm creating a Maplet that shows the graphic of a function. I want to know
if it is possible to create a button that allows us to save the plot image
to a file (wmf type). How can we use the plotsetup instruction in a maplet?







_________________________________________________________________
MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com

[MUG] Re: plotsetup in maplets!
Author: Maple User Group    Posted: Mon, 4 Nov 2002 10:24:13 -0500 (

>> From: Maple User Group "maple_gr"

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

From: Douglas Wilhelm Harder "douglas"
Subject: plotsetup in maplets!
To: "maple-list"
Date: Fri, 1 Nov 2002 13:33:44 -0500 (EST)

Hello,

> I'm creating a Maplet that shows the graphic of a function. I want to know
> if it is possible to create a button that allows us to save the plot image
> to a file (wmf type). How can we use the plotsetup instruction in a maplet?

The following works, but it pops up a separate window (at least on Unix)
I guess on windows it would be plotsetup(window);

try
plotdev := subs( plotsetup(), 'plotdevice' );
plotsetup( 'window' );

use Maplets:-Elements in
Maplets:-Display( Maplet( [
TextBox[TB1]( 'visible' = 'false' ),
Button( "Hi", Evaluate( TB1 = 'f()' ) )
] ) );
end use;
catch:
plotsetup( plotdev );
end try;

For example, you could have them manipulate the plot, and then to save,
you would pop up an x11 or window plot which would then allow the user
to save it from the menus.

Cheers,

Douglas
--
Douglas Wilhelm Harder -: 3- -.- =.- -: -3 .* =. -:- :- . -: .= -:- * -:- -.
Department of Electrical and Computer Engineering http://ece.uwaterloo.ca/
University of Waterloo http://cheetah.vlsi.uwaterloo.ca/~dwharder/
.___ DC 2703 519-885-1211 x7023 http://links.uwaterloo.ca/
\ ."""". .-----._____.-----._______.-----._____.-----._____.--
\____/ --10-- http://www.scg.uwaterloo.ca/ http://mapleapps.com/


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Fri, 1 Nov 2002 11:03:02 -0800 (PST)
From: Robert Israel "israel"
To: "maple-list"
Subject: plotsetup in maplets!


It should work, but doesn't: this is a bug, and a very annoying one! For
example:

> with(Maplets[Elements]):
m:= Maplet([[Button("Plot", Evaluate(function="plotit")),
Button("Done", Shutdown())]]):
plotit:= proc()
plotsetup(gif, plotoutput="d:/tmp/foo.gif");
plot(x,x=0..1);
plotsetup(default);
end;
Maplets[Display](m);

The procedure plotit is executed, but no file "foo.gif"
is created. It seems that ordinary plotting to files is disabled
when a Maplet is active.

The only work-around I can suggest is to save the plot structure,
and produce the file when the Maplet exits.

Robert Israel "israel"
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2

[MUG] Re: plotsetup in maplets!
Author: Bertfried Fauser    Posted: Mon, 4 Nov 2002 20:48:02 +0100 (

>> From: Bertfried Fauser "fauser"

Dear Prof. Israel,

I am not sure that this has to be considered a bug! If maplest are used
over the web, there is a security swiths -z which disables file actions of
maple. I would guess that this is done by default when a maplet starts.
Think about the case that a bad user types some
march('delete',libname[1]); etc coden into a maplet or spys out your
harddisk (Ia m not aware what kind of pocess management M$ 200 or XP has,
but under unix maple has teh same rights as the user who starts it, and
that may be to much)

Why to use mapltes at all if you do not make them over the
internet availabe via MapleNet? I see no advantage of such a thing over
the gui I have in any case.

best
BF.

> It should work, but doesn't: this is a bug, and a very annoying one! For
> example:

% Bertfried Fauser Fachbereich Physik Fach M 678
% Universit"at Konstanz 78457 Konstanz Germany
% Phone : +49 7531 883786 FAX : +49 7531 88-4864 or 4266
% E-mail: "Bertfried.Fauser"
% Web : http://clifford.physik.uni-konstanz.de/~fauser

[MUG] Re: plotsetup in maplets!
Author: Robert Israel    Posted: Fri, 8 Nov 2002 15:13:04 -0800 (

>> From: Robert Israel "israel"

Security is certainly a concern if you're putting anything on the web, but
it's a separate issue. This particular Maplet was not put on the web.
AFAIK the -z option is global: it is specified on the command line and
affects the whole Maple session. Maplets in general are able to do
file I/O, and even the "system" and "ssystem" commands. So whatever
causes the inability of Maplets to make plot files, it isn't a concern
for security.

Robert Israel "israel"
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2


On Mon, 4 Nov 2002, Bertfried Fauser wrote:

> Dear Prof. Israel,
>
> I am not sure that this has to be considered a bug! If maplest are used
> over the web, there is a security swiths -z which disables file actions of
> maple. I would guess that this is done by default when a maplet starts.
> Think about the case that a bad user types some
> march('delete',libname[1]); etc coden into a maplet or spys out your
> harddisk (Ia m not aware what kind of pocess management M$ 200 or XP has,
> but under unix maple has teh same rights as the user who starts it, and
> that may be to much)
>
> Why to use mapltes at all if you do not make them over the
> internet availabe via MapleNet? I see no advantage of such a thing over
> the gui I have in any case.
>
> best
> BF.
>
> > It should work, but doesn't: this is a bug, and a very annoying one! For
> > example:
>
> % Bertfried Fauser Fachbereich Physik Fach M 678
> % Universit"at Konstanz 78457 Konstanz Germany
> % Phone : +49 7531 883786 FAX : +49 7531 88-4864 or 4266
> % E-mail: "Bertfried.Fauser"
> % Web : http://clifford.physik.uni-konstanz.de/~fauser
>
>

Previous by date: [MUG] Re:Maple 8 under Debian GNU/Linux, Stian Davidsen
Next by date: [MUG] Animation of drawing a function point-by-point,  Sandy Yates
Previous thread: [MUG] solving inequality, M A Suzen
Next thread: [MUG] Animation of drawing a function point-by-point,  Sandy Yates



Ready to buy?

Maple - single user licence
Add to shopping basket
$ 1,895.00
Upgrade to Maple 12 from v11
Add to shopping basket
$ 995.00
Upgrade to Maple 12 from v10 & below
Add to shopping basket
$ 1,395.00

Featured Downloads

Maple White Paper: Technical Knowledge - An Asset You Can Afford to Lose?
Maple in Electronics Application Pack
Maple in Robotics & Aerospace Application Pack
Maple in Finance Application Pack

Product Reviews

"Without the Maple software, we would have to spend weeks generating the equations of motion for every experiment. Then the chances that we did it right would basically be near zero. There would always be a mistake somewhere. It is very difficult to set up a dynamic motion model by hand."
- Jean-Claude PiedBeouf, Ph.D Manager of Robotics, Canadian Space Agency

"Its very good - highly accurate and easy to use. The speed of Maple allows me to change equations and quickly reintegrate them into the application, so more possibilities can be explored to achieve the precise effect desired."
Shawn Neely, Senior R & D Director for PDI/Dreamworks
adept

Top of the Page

Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2007, Adept Scientific plc.
Site designed and maintained by Adeptise

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055