Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.maple > #184 > unrolled thread
| Started by | Salmon Egg <SalmonEgg@sbcglobal.net> |
|---|---|
| First post | 2011-06-19 11:21 -0700 |
| Last post | 2011-06-21 00:50 -0700 |
| Articles | 9 — 6 participants |
Back to article view | Back to comp.soft-sys.math.maple
Multiple plots with stepped parameters Salmon Egg <SalmonEgg@sbcglobal.net> - 2011-06-19 11:21 -0700
Re: Multiple plots with stepped parameters Axel Vogt <&noreply@axelvogt.de> - 2011-06-19 21:38 +0200
Re: Multiple plots with stepped parameters Joe Riel <joer@san.rr.com> - 2011-06-19 13:46 -0700
AW: Multiple plots with stepped parameters "Michael Komma" <komma@oe.uni-tuebingen.de> - 2011-06-20 23:34 +0200
Re: AW: Multiple plots with stepped parameters Salmon Egg <SalmonEgg@sbcglobal.net> - 2011-06-20 17:33 -0700
Re: AW: Multiple plots with stepped parameters "Barister Mine" <me@privacy.net> - 2011-06-21 07:45 +0300
AW: AW: Multiple plots with stepped parameters "Michael Komma" <komma@oe.uni-tuebingen.de> - 2011-06-21 11:15 +0200
Re: AW: Multiple plots with stepped parameters Axel Vogt <&noreply@axelvogt.de> - 2011-06-21 23:04 +0200
Re: Multiple plots with stepped parameters Roman <wfrisch@gmx.net> - 2011-06-21 00:50 -0700
| From | Salmon Egg <SalmonEgg@sbcglobal.net> |
|---|---|
| Date | 2011-06-19 11:21 -0700 |
| Subject | Multiple plots with stepped parameters |
| Message-ID | <SalmonEgg-4EE972.11212019062011@news60.forteinc.com> |
My example will based upon blackbody radiation. Suppose the emission at
a frequency nu at various temperatures goes like
J := 1/(exp(nu/T)-1)
How do I plot J against nu for all T in a list like
{0.5, 1.0. 2.0, 5.0, 10.0}?
I think I see how to do that if I listed separate functions in the plot
command. ie
1/(exp(nu/0.5)-1), 1/(exp(nu/1.0)-1), ...
--
Sam
Conservatives are against Darwinism but for natural selection.
Liberals are for Darwinism but totally against any selection.
[toc] | [next] | [standalone]
| From | Axel Vogt <&noreply@axelvogt.de> |
|---|---|
| Date | 2011-06-19 21:38 +0200 |
| Message-ID | <9671hcFjfmU1@mid.individual.net> |
| In reply to | #184 |
On 19.06.2011 20:21, Salmon Egg wrote:
> My example will based upon blackbody radiation. Suppose the emission at
> a frequency nu at various temperatures goes like
>
> J := 1/(exp(nu/T)-1)
>
> How do I plot J against nu for all T in a list like
>
> {0.5, 1.0. 2.0, 5.0, 10.0}?
>
> I think I see how to do that if I listed separate functions in the plot
> command. ie
>
> 1/(exp(nu/0.5)-1), 1/(exp(nu/1.0)-1), ...
>
You may have a scaling problem for showing it, but for example:
L:=[0.5, 1.0. 2.0, 5.0, 10.0]; # use an ordered list, not a set
P:=NULL;
for t in L do # run through the list
eval(J, nu=t); # evaluate expression
plot(%, T=0 .. 1); # plot for each
P:=P, %; # remember it
end do:
plots[display](P); # print
[toc] | [prev] | [next] | [standalone]
| From | Joe Riel <joer@san.rr.com> |
|---|---|
| Date | 2011-06-19 13:46 -0700 |
| Message-ID | <874o3lim7o.fsf@san.rr.com> |
| In reply to | #185 |
Axel Vogt <&noreply@axelvogt.de> writes:
> On 19.06.2011 20:21, Salmon Egg wrote:
>> My example will based upon blackbody radiation. Suppose the emission at
>> a frequency nu at various temperatures goes like
>>
>> J := 1/(exp(nu/T)-1)
>>
>> How do I plot J against nu for all T in a list like
>>
>> {0.5, 1.0. 2.0, 5.0, 10.0}?
>>
>> I think I see how to do that if I listed separate functions in the plot
>> command. ie
>>
>> 1/(exp(nu/0.5)-1), 1/(exp(nu/1.0)-1), ...
>>
>
> You may have a scaling problem for showing it, but for example:
>
> L:=[0.5, 1.0. 2.0, 5.0, 10.0]; # use an ordered list, not a set
>
> P:=NULL;
> for t in L do # run through the list
> eval(J, nu=t); # evaluate expression
> plot(%, T=0 .. 1); # plot for each
> P:=P, %; # remember it
> end do:
>
> plots[display](P); # print
A minor comment. Axel's solution is fine for this application, but
building a list like that, term by term, is an O(n^2) process, so that
if L gets long enough, you could have issues. Fortunately, the list
building can be done in O(n) by using seq:
plots:-display(seq(plot(eval(J,nu=t),T=0..1), t in L));
That is unlikely to be an issue here since the number of plots one is
likely to create in one graph is presumably fairly small. Because most
of the time is in the plot building (and that is O(n) with either
approach), Axel's method is suitable.
--
Joe Riel
[toc] | [prev] | [next] | [standalone]
| From | "Michael Komma" <komma@oe.uni-tuebingen.de> |
|---|---|
| Date | 2011-06-20 23:34 +0200 |
| Subject | AW: Multiple plots with stepped parameters |
| Message-ID | <itoedi$f6c$1@solani.org> |
| In reply to | #184 |
Conservatives plot:
plots:-display([seq(plot(J,nu=0..10,0..20),T=[0.5, 1.0, 2.0, 5.0, 10.0])]);
Liberals plot:
http://www.mikomma.de/planck/planck1.html
"Salmon Egg" <SalmonEgg@sbcglobal.net> schrieb im Newsbeitrag
news:SalmonEgg-4EE972.11212019062011@news60.forteinc.com...
> My example will based upon blackbody radiation. Suppose the emission at
> a frequency nu at various temperatures goes like
>
> J := 1/(exp(nu/T)-1)
>
> How do I plot J against nu for all T in a list like
>
> {0.5, 1.0. 2.0, 5.0, 10.0}?
>
> I think I see how to do that if I listed separate functions in the plot
> command. ie
>
> 1/(exp(nu/0.5)-1), 1/(exp(nu/1.0)-1), ...
>
> --
>
> Sam
>
> Conservatives are against Darwinism but for natural selection.
> Liberals are for Darwinism but totally against any selection.
[toc] | [prev] | [next] | [standalone]
| From | Salmon Egg <SalmonEgg@sbcglobal.net> |
|---|---|
| Date | 2011-06-20 17:33 -0700 |
| Subject | Re: AW: Multiple plots with stepped parameters |
| Message-ID | <SalmonEgg-1D51AE.17330720062011@news60.forteinc.com> |
| In reply to | #187 |
In article <itoedi$f6c$1@solani.org>,
"Michael Komma" <komma@oe.uni-tuebingen.de> wrote:
> Conservatives plot:
>
> plots:-display([seq(plot(J,nu=0..10,0..20),T=[0.5, 1.0, 2.0, 5.0, 10.0])]);
>
> Liberals plot:
>
> http://www.mikomma.de/planck/planck1.html
>
>
>
> "Salmon Egg" <SalmonEgg@sbcglobal.net> schrieb im Newsbeitrag
> news:SalmonEgg-4EE972.11212019062011@news60.forteinc.com...
> > My example will based upon blackbody radiation. Suppose the emission at
> > a frequency nu at various temperatures goes like
> >
> > J := 1/(exp(nu/T)-1)
> >
> > How do I plot J against nu for all T in a list like
> >
> > {0.5, 1.0. 2.0, 5.0, 10.0}?
> >
> > I think I see how to do that if I listed separate functions in the plot
> > command. ie
> >
> > 1/(exp(nu/0.5)-1), 1/(exp(nu/1.0)-1), ...
> >
> > --
> >
> > Sam
> >
> > Conservatives are against Darwinism but for natural selection.
> > Liberals are for Darwinism but totally against any selection.
This may be just what I am looking for. My German is not good enough for
me to tell. The point of my post was not to study black body radiation
but how to do the plotting. It did come about, however, from my wanting
to show why the color (that is the visible spectral SHAPE) remained the
same for a black body even as the temperature approached infinity.
(Wikipedia) In the process it became obvious, that I did not know how to
use Maple to produce suitable plots. The Maple command you give is
arcane and I do not see how to get there without guidance like yours.
I am going to continue looking at the German site given in your
response. I am also looking at the responses by Vogt and Riel until I
can master this aspect of plotting.
--
Sam
Conservatives are against Darwinism but for natural selection.
Liberals are for Darwinism but totally against any selection.
[toc] | [prev] | [next] | [standalone]
| From | "Barister Mine" <me@privacy.net> |
|---|---|
| Date | 2011-06-21 07:45 +0300 |
| Subject | Re: AW: Multiple plots with stepped parameters |
| Message-ID | <itp7lt$sj2$1@speranza.aioe.org> |
| In reply to | #188 |
Salmon Egg schrib:
> In article <itoedi$f6c$1@solani.org>,
> "Michael Komma" <komma@oe.uni-tuebingen.de> wrote:
>
>> Conservatives plot:
>>
>> plots:-display([seq(plot(J,nu=0..10,0..20),T=[0.5, 1.0, 2.0, 5.0,
>> 10.0])]);
>>
>> Liberals plot:
>>
>> http://www.mikomma.de/planck/planck1.html
>>
>>
>>
>> "Salmon Egg" <SalmonEgg@sbcglobal.net> schrieb im Newsbeitrag
>> news:SalmonEgg-4EE972.11212019062011@news60.forteinc.com...
>>> My example will based upon blackbody radiation. Suppose the
>>> emission at a frequency nu at various temperatures goes like
>>>
>>> J := 1/(exp(nu/T)-1)
>>>
>>> How do I plot J against nu for all T in a list like
>>>
>>> {0.5, 1.0. 2.0, 5.0, 10.0}?
>>>
>>> I think I see how to do that if I listed separate functions in the
>>> plot command. ie
>>>
>>> 1/(exp(nu/0.5)-1), 1/(exp(nu/1.0)-1), ...
>>>
>>> --
>>>
>>> Sam
>>>
>>> Conservatives are against Darwinism but for natural selection.
>>> Liberals are for Darwinism but totally against any selection.
>
> This may be just what I am looking for. My German is not good enough
> for me to tell. The point of my post was not to study black body
> radiation but how to do the plotting. It did come about, however,
> from my wanting to show why the color (that is the visible spectral
> SHAPE) remained the same for a black body even as the temperature
> approached infinity. (Wikipedia) In the process it became obvious,
> that I did not know how to use Maple to produce suitable plots. The
> Maple command you give is arcane and I do not see how to get there
> without guidance like yours.
>
> I am going to continue looking at the German site given in your
> response. I am also looking at the responses by Vogt and Riel until I
> can master this aspect of plotting.
For color Maple plots, check this one:
http://ioannis.virtualcomposer2000.com/spectroscope/elements.html
However the author does not give explicit Maple commands for these plots in the
document itself.
I don't really understand how he calculates the overall color.
---
JPH
[toc] | [prev] | [next] | [standalone]
| From | "Michael Komma" <komma@oe.uni-tuebingen.de> |
|---|---|
| Date | 2011-06-21 11:15 +0200 |
| Subject | AW: AW: Multiple plots with stepped parameters |
| Message-ID | <itpngg$jqo$1@solani.org> |
| In reply to | #188 |
I think it's not too arcane. Perhaps plots:-display is a bit confusing, but I'm accustomed to use it for more flexibility. If you look at ?seq The seq(f(i), i in x) calling sequence is equivalent to seq(f(i), i = x). and ?plot,details Generating Multiple Curves You'll find the straight forward command plot([seq(1/(exp(nu/T)-1),T=[0.5, 1.0, 2.0, 5.0, 10.0])],nu=0..10,0..20); (as you proposed). Michael > The Maple command you give is > arcane and I do not see how to get there without guidance like yours. > > I am going to continue looking at the German site given in your > response. I am also looking at the responses by Vogt and Riel until I > can master this aspect of plotting. > > -- > > Sam > > Conservatives are against Darwinism but for natural selection. > Liberals are for Darwinism but totally against any selection.
[toc] | [prev] | [next] | [standalone]
| From | Axel Vogt <&noreply@axelvogt.de> |
|---|---|
| Date | 2011-06-21 23:04 +0200 |
| Subject | Re: AW: Multiple plots with stepped parameters |
| Message-ID | <96cfa8FpkdU1@mid.individual.net> |
| In reply to | #188 |
On 21.06.2011 02:33, Salmon Egg wrote:
> In article<itoedi$f6c$1@solani.org>,
> "Michael Komma"<komma@oe.uni-tuebingen.de> wrote:
>
>> Conservatives plot:
>>
>> plots:-display([seq(plot(J,nu=0..10,0..20),T=[0.5, 1.0, 2.0, 5.0, 10.0])]);
>>
>> Liberals plot:
>>
>> http://www.mikomma.de/planck/planck1.html
>>
>>
>>
>> "Salmon Egg"<SalmonEgg@sbcglobal.net> schrieb im Newsbeitrag
>> news:SalmonEgg-4EE972.11212019062011@news60.forteinc.com...
>>> My example will based upon blackbody radiation. Suppose the emission at
>>> a frequency nu at various temperatures goes like
>>>
>>> J := 1/(exp(nu/T)-1)
>>>
>>> How do I plot J against nu for all T in a list like
>>>
>>> {0.5, 1.0. 2.0, 5.0, 10.0}?
>>>
>>> I think I see how to do that if I listed separate functions in the plot
>>> command. ie
>>>
>>> 1/(exp(nu/0.5)-1), 1/(exp(nu/1.0)-1), ...
>>>
>>> --
>>>
>>> Sam
>>>
>>> Conservatives are against Darwinism but for natural selection.
>>> Liberals are for Darwinism but totally against any selection.
>
> This may be just what I am looking for. My German is not good enough for
> me to tell. The point of my post was not to study black body radiation
> but how to do the plotting. It did come about, however, from my wanting
> to show why the color (that is the visible spectral SHAPE) remained the
> same for a black body even as the temperature approached infinity.
> (Wikipedia) In the process it became obvious, that I did not know how to
> use Maple to produce suitable plots. The Maple command you give is
> arcane and I do not see how to get there without guidance like yours.
>
> I am going to continue looking at the German site given in your
> response. I am also looking at the responses by Vogt and Riel until I
> can master this aspect of plotting.
>
To master arcane: I had the same problem learning Maple, but it
is "only" that multiple commands are combined into 1 line, thus
I try to avoid it (and still do it for myself). It simply is too
compact for learning.
I am sure, that Michael Komma can drill it down for you into steps
if you can not succeed starting from the most inner one command
(which is not intended as critics to his replies).
[toc] | [prev] | [next] | [standalone]
| From | Roman <wfrisch@gmx.net> |
|---|---|
| Date | 2011-06-21 00:50 -0700 |
| Message-ID | <4963a09b-d3f5-4487-a372-e3c5d059bfc9@bl1g2000vbb.googlegroups.com> |
| In reply to | #184 |
On Jun 19, 8:21 pm, Salmon Egg <Salmon...@sbcglobal.net> wrote:
> My example will based upon blackbody radiation. Suppose the emission at
> a frequency nu at various temperatures goes like
>
> J := 1/(exp(nu/T)-1)
>
> How do I plot J against nu for all T in a list like
>
> {0.5, 1.0. 2.0, 5.0, 10.0}?
>
> I think I see how to do that if I listed separate functions in the plot
> command. ie
>
> 1/(exp(nu/0.5)-1), 1/(exp(nu/1.0)-1), ...
>
> --
>
> Sam
>
> Conservatives are against Darwinism but for natural selection.
> Liberals are for Darwinism but totally against any selection.
***********************************************
Joe´s solution with different coloured plots.
restart:
J := 1/(exp(nu/T)-1) ;
L:=[ 0.5,1.0,2.0,5.0,10.0];
plots:-
display(seq(plot(eval(J,nu=t),T=0..10,y=0..1.5,color=COLOR(RGB,rand()/
10^12,rand()/10^12,rand()/10^12),legend=t), t in L));
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.maple
csiph-web