List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Simple implicitplot question
| [MUG] Simple implicitplot question |
|
Author: Shayne G Wright
Posted: Sat, 13 Apr 2002 13:08:35 -0600
|
>> From: "Shayne G. Wright" "swright"
Hi
Is it possible to specify multiple colors for multiple functions using
implicitplot?
i.e
implicitplot({y=log[3](x), y=3^x, y=x, y=1, x=3}, x=-4..4,
y=-4..4, colour=BLUE); expect I can only seem to be able to specify
one colour for all functions, but not one colour for each function.
I would use plot or smartplot, except I cannot figure out how to add
x=1 or y=1 to these kinds of plots.
Many thanks,
Take care,
Shayne
|
| [MUG] Re: Simple implicitplot question |
|
Author: Maple User Group
Posted: Tue, 16 Apr 2002 11:31:34 -0400
|
>> From: Maple User Group "maple_gr"
| >> From: "Shayne G. Wright" "swright"
| Is it possible to specify multiple colors for multiple functions using
| implicitplot?
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: Stanley J Houghton "S.J.Houghton"
Date: Mon, 15 Apr 2002 15:23:39 +0100
To: "maple-list" "swright"
Subject: Simple implicitplot question
Try
with(plots):
> display({
> implicitplot(y=log[3](x), x=-4..4, y=-4..4, colour=BLUE),
> implicitplot(y=3^x, x=-4..4, y=-4..4, colour=RED),
> implicitplot(y=x, x=-4..4, y=-4..4, colour=GREEN),
> implicitplot(y=1, x=-4..4, y=-4..4, colour=YELLOW),
> implicitplot(x=3, x=-4..4, y=-4..4, colour=BLACK)
> });
Regards
Stan
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 16 Apr 2002 09:15:09 +0900
To: "maple-list"
From: tanaka "tanaka.kazuo205"
Subject: Fwd: Simple implicitplot question
This is Dr.TANAKA, Canon Inc.
Please try as follows:
>restart:with(plots):
>a:=implicitplot({y=log[3](x)}, x=-4..4, y=-4..4, color=blue):
>b:=implicitplot({y=3^x}, x=-4..4, y=-4..4, color=red):
>c:=implicitplot({y=x}, x=-4..4, y=-4..4, color=pink):
>d:=implicitplot({y=1}, x=-4..4, y=-4..4, color=black):
> e:=implicitplot({x=3}, x=-4..4, y=-4..4, color=turquoise):
plots[display]([a,b,c,d,e]);
Dr.TANAKA, Kazuo
General Manager,
Technology Administration Headquaters, Canon Inc.,
Tokyo, 146-8501, JAPAN
"mailto:tanaka.kazuo205"
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 16 Apr 2002 12:45:06 +0200
From: Daniel Meisel "Daniel.Meisel"
To: "maple-list"
Subject: Simple implicitplot question
Hi,
the following should work:
restart:
with(plots):
myplot1:=implicitplot(y=log[3](x), x=-4..4, y=-4..4, colour=BLUE):
myplot2:=implicitplot(y=3^x, x=-4..4, y=-4..4, colour=RED):
myplot3:=implicitplot(y=x, x=-4..4, y=-4..4, colour=YELLOW):
myplot4:=implicitplot(y=1,x=-4..4, y=-4..4, colour=GREEN):
myplot5:=implicitplot(x=3, x=-4..4, y=-4..4, colour=ORANGE):
display(myplot1,myplot2,myplot3,myplot4,myplot5,axes=boxed,
scaling=constrained);
--
Universitdt Karlsruhe
Institut fur Angewandte Physik
Daniel Meisel
Germany
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 16 Apr 2002 13:09:59 +0100
From: "Dr Francis J. Wright" "f.j.wright"
To: "Shayne G. Wright" "swright"
Subject: Simple implicitplot question
As far as I am aware, the 3D plotting functions do not accept lists of
options in the way that the 2D plotting functions do, which is a pity.
One can achieve the same effect by combining separate plots with
distinct colours using display, but it's a bit long-winded.
| I would use plot or smartplot, except I cannot figure out how to add
| x=1 or y=1 to these kinds of plots.
Any curve that is not the graph of a function, namely x=1 in your case,
can be specified parametrically. So I would perform the plot like this,
which gives similar but better results than implicitplot and also gives
multiple colours:
plot([log[3](x), 3^x, x, 1, [3,yy,yy=-4..4]], x=-4..4, y=-4..4,
colour=[RED,BLUE,GREEN,YELLOW,BLACK]);
Francis
--
Dr Francis J. Wright | mailto: "F.J.Wright"
School of Mathematical Sciences | tel: (020) 7882 5453 (direct)
Queen Mary, University of London | fax: (020) 8981 9587 (dept.)
Mile End Road, London E1 4NS, UK | http://centaur.maths.qmul.ac.uk/
|
| [MUG] Re: Simple implicitplot question |
|
Author: Carl Devore
Posted: Thu, 25 Apr 2002 09:05:06 -0400
|
>> From: Carl Devore "devore"
>> From: "Shayne G. Wright" "swright"
> Is it possible to specify multiple colors for multiple functions using
> implicitplot?
Implicitplot for lists of curves
It is a commonly reported annoyance that implicitplot does not work for
lists of curves. The first argument can be a set of curves, but not a
list. There is no real reason for this other than bad design. That makes
it difficult to plot, for example, a list of curves each in a different
color. The procedure presented below corrects that. There are nine
options to implicitplot which are applicable to the individual curves
rather than the plot as a whole: color, coords, legend, linestyle,
numpoints, style, symbol, symbolsize, and thickness. If any of these
options are present with a list on the right side, then my procedure
applies the kth member of the list to a kth curve. If the option is
present without a list, then that option is applied to all the curves.
If the color option is not specified, then my procedure uses the same
sequence of colors as used by plot.
> Implicitplot:= proc()
> option `Copyright (c) 2002, Carl DeVore. All rights reserved.`;
> local listable,others,i,F,C;
> F:= args[1];
> if not F::list then return plots[implicitplot](args) fi;
> listable,others:=
> selectremove
> (a-> a::`=`
> and member
> (lhs(a)
> ,[color, coords, legend, linestyle, numpoints
> ,style, symbol, symbolsize, thickness
> ])
> and rhs(a)::list
> ,{args[2..-1]}
> );
> if not member(color, map(lhs, listable union indets(others, `=`))) then
> C:= [:-_COLORRGB];
> listable:=
> {listable[], color= [seq(COLOR(RGB, C[1+irem(i-1, nops(C))][]), i= 1..nops(F))]}
> fi;
> plots[display]
> (seq(plots[implicitplot]
> (F[i]
> ,others[]
> ,map(a-> lhs(a)=rhs(a)[i], listable)[]
> )
> ,i= 1..nops(F)
> )
> )
> end proc:
Example:
> Implicitplot
([x^2+y^2=1, x^2+y^2=2]
x= -2..2, y= -2..2
,legend= ["small", "large"]
);
The above procedure will soon be on the Maple Applications Center.
(Probably already there by the time you read this.)
|
Previous by date: [MUG] Re: lexorder inside dsolve, Joe Riel
Next by date: [MUG] Re: Generating JPEGs through CMaple (RESOLVED), Moore, Chuck DIS
Previous thread: [MUG] Problems with solving systems of equations, Roush, Craig Ryan UMKC-Student
Next thread: [MUG] Generating JPEGs through CMaple, Moore, Chuck DIS
|