mm-919 === Subject: Re: Solving Simultaneous Differential Equations Hi Nikhil, the following will plot the first equation: Plot[Evaluate[(eqs /. %)[[1]]], {t, 0, 10}] hope this helps, Daniel > Hey guys, I'm working on a model of the heart, which can be simplified to eleven simultaneous differential equations... I am solving them all with NDSolve and explicit Runge Kutta numerical integration. I am happy with the results, but I don't know how to plot a single function, of the eleven that are solved simultaneously. > z > I can plot all 11 of them on one graph by using Plot[Evaluate[eqs /. %], {t, 0, 10}] where eqs are all 11 functions, and the last output was the set of the 11 interpolating functions. Plotting all 11 pretty much has no value to me though. How do I store the interpolating function data for each function so I can plot each by itself? Also, how can I save step-by-step results using Reap/Sow? === Subject: Re: why is Export to .SWF (Macromedia Flash file format) of a manipulate Hi Nasser, I can give an ultimate answer, but I guess that mathematica is creating an awfull lot of pictures to get a smooth animation. Maybe it will help if the parametr does not vary continuously but with steps, although I did not try this. hope this helps, Daniel > hi; Mathematica only, it takes about 20 minutes to export a manipulate > object to Macromedia Flash file format (.swf). I do: u=Manipulate[....] > Export[u.swf,u]; and now I wait and wait and wait... anything one can do to speed this up? I have not tried other formats. > It might not be related to .swf format, but the export of manipulate > itself is slow? Nasser === Subject: I would like close this thread by myself hi, there, I got one solution from another thread, which suggested using Michael Chen > [version 6.0] I did the integration by hand and the result is piecewise function in > (x1,x2). It is doable, though tedious. I expect Mathematica can do it much > fast, however it takes 5 hours without result yet. Maybe there are better > ways to do it in Mathematica? Simplify[ > Integrate[h1-x1 Boole[h1-x1>0 && h2-x2>0 && h1-x1>h2-x2], {h1,B1,U1}, > {h2,B2,U2}, Assumptions->B1 ] > -- > Michael Chen === Subject: Re: slideshow presentation in Notebook format In Mathematica 6, the easiest way is to choose the menu item File > New > slide Show and you'll have a template for a slide show. Now what you'll see won't look like a slide show quite yet, since you're viewing it on-screen in ordinary, Working form. At any point, to toggle it into SlideShow format, select the menu item: Format > Screen Environment > SlideShow Now you'll see just one slide at a time, and the navigation icons will appear at the top and right-bottom of each slide. There's also a SlideShow palette (menu item Palettes > SlideShow) that makes it easier to toggle between normal and Slide Show format on-screen, and it also allows you to insert new slides without manual copy-and-paste, and to create a Table of Contents -- a separate, pop-up palette, that's like similar navigation panels in Power Point. For fancier formatting, you'll need to customize the notebook. For example, slide show notebooks used at many Mathematica conferences have custom templates that provide a logo, etc. > Hello UG: Is this documented somewhere? I notice that many NBs from the Wolfram > conference have 'next' and 'prev' buttons for pagination, but I am not > sure how to make this for myself. TIA. > -- Murray Eisenberg murray@math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305 === Subject: ShowLegend error The following piece of code in Mathematica 6.0 < {-1,1}],{GrayLevel,20, -1,+1}] does generate the graphics expected: an arrayplot with the correct legend. But is also generates this error: Ticks::ticks: {None,None} is not a valid tick specification. >> which is repeated a few times. Does anyone know where the problem lies, in de code?, in mathematica 6? Maarten van der Burgt Leuven, Belgium === Subject: Re: ShowLegend error The following piece of code in Mathematica 6.0 < ShowLegend[ArrayPlot[Table[Sin[x y],{x,-2,2,.1},{y,-2,2,.1}],PlotRange- {-1,1}],{GrayLevel,20, -1,+1}] does generate the graphics expected: an arrayplot with the correct legend. But is also generates this error: Ticks::ticks: {None,None} is not a valid tick specification. >> which is repeated a few times. Does anyone know where the problem lies, in de code?, in mathematica 6? For some reasons *ShowLegend* seems to mismanaged ticks specifications (see below a similar example with *MatrixPlot* rather than *ArrayPlot*). In the case of *ArrayPlot*, using a transformation rule, you can easily change the wrong tick specification {None, None} by None (although I admit that this fails short to explain anything about this weird behavior). << PlotLegends` ShowLegend[ArrayPlot[Table[Sin[x*y], {x, -2, 2, 0.1}, {y, -2, 2, 0.1}], PlotRange -> {-1, 1}] /. {None, None} -> None, {GrayLevel, 20, -1, +1}, Ticks -> Automatic] [... graphic deleted ...] ShowLegend[MatrixPlot[Table[Sin[x*y], {x, -2, 2, 0.1}, {y, -2, 2, 0.1}]], {Hue, 20, -1, +1}] Ticks::ticks: {{{40.5,1},{31.5,10},{21.5,20},{11.5,30},{0.5,41}},{{40.5,1},{31.5,10} ,<<1>>,{11.5,30},{0.5,41}}} is not a valid tick specification. >> [... more error messages and graphic deleted ...] Jean-Marc > Maarten van der Burgt > Leuven, Belgium === Subject: Is FilledContourPlot exist ? mathematica 5 i would like to colorize an area between ton curves defined by two contourplot functions but i do not succeed in doing this i see there is FilledListPlot or FilledPlot, for simple curves like Sin[x] (like in the help) bur nothing for ContourPlot === Subject: Re: Solving Simultaneous Differential Equations Here's how I do it. NDSolve returns a nested list of rules for the set of variables. I then just define a function for each using a transformation rule. Probably a better way though. In[82]:= Clear[x, y, z, t] solutions = NDSolve[{Derivative[1][x][t] == -3*(x[t] - y[t]), Derivative[1][y][t] == (-x[t])*z[t] + 26.5*x[t] - y[t], Derivative[1][z][t] == x[t]*y[t] - z[t], x[0] == z[0] == 0, y[0] == 1}, {x, y, z}, {t, 0, 20}] Out[83]= {{x -> InterpolatingFunction[], y -> InterpolatingFunction[], z -> InterpolatingFunction[]}} In[126]:= f1[t_] := (x /. Flatten[solutions])[t] Plot[f1[t], {t, 0, 5}] How do I store the interpolating function data for > each function so I can plot each by itself? > === Subject: GammaDistribution versus PoissonDistribution as far as I understand the GammaDistribution has two parameters: alfa and beta. With beta =1 one should get the PoissonDistribution with paramter alfa-1. I did, just to check: N[Table[{i, PDF[PoissonDistribution[12],i], PDF[GammaDistribution[13,1],i] },{i,0,30}] I got different values. Can anyone help me in what I do wrong? with friendly greetings, Peter === Subject: Re: GammaDistribution versus PoissonDistribution try PDF[PoissonDistribution[12], x] and PDF[GammaDistribution[x + 1, 1], 12] Jens > as far as I understand the GammaDistribution has two parameters: alfa and beta. With beta =1 one should get the PoissonDistribution with paramter alfa-1. > I did, just to check: > N[Table[{i, PDF[PoissonDistribution[12],i], > PDF[GammaDistribution[13,1],i] },{i,0,30}] > I got different values. > Can anyone help me in what I do wrong? > with friendly greetings, > Peter > === Subject: Issue with Synchronization between Manipulate and functions called by Manipulate with Graphics[] Bytes: 3028 (Mathematica 6.0, Windows XP, OLD PC) Manipulate[expr,{n,1,10}] is supposed to evaluate expr for each value of 'n'. There seems to be a synchronization problem between Manipulate[] and completing evaluation of expr, when there is a Graphics inside expr. I have a simple example below, where expr is a function, which displays 'n'. ---- CODE ----------------- process[a_] := Graphics[ {Text[StringJoin[a=, ToString[a]]]}, ImageSize -> {40} ] Manipulate[ process[a], {a, 1, 10, 1} ] ---- END CODE ----------------------- If you run the above, and click on 'play' and look at the display inside the Graphics window, you will see that not every integer is being printed. i.e. NOT each 'n' is being displayed. Some values of 'n' are skipped. What is being displayed is something like 2,4,6... or 1,2,3,5,6,... instead of 1,2,3,4,5,.... i.e. some numbers do NOT get displayed, while Manipulate itself is of course is incrementing 'n' correctly. This ofcourse might depend on speed of the computer itself and other factors, but on my slow PC, I see this is clearly happening. I think this happens because Manipulate is calling expr before the previous Graphics[] which displays the text is fully flushed out to display within the function expr. Hence, expr returns back, and Manipulate now calls it with n+1 value, earlier 'n' in some internal Graphics buffer, and what I see is n+1 and 'n' is missing. I need a way to make sure Graphics[] is completed inside expr before I return back from the function, back to Manipulate, to prevent this problem. To confirm this, when I 'slow' down Manipulate using the 'slow' control, now I see that each number is being displayed ok. So this clearly is telling me there is a buffer overrun problem. I need to study the documentation more, I just started using Manipulate, but I noticed this problem. Do you think I am interpreting this ok, or am I doing something silly elsewhere? thank you Nasser === Subject: Re: Issue with Synchronization between Manipulate and functions called Bytes: 3228 Manipulate[Dynamic@ process[a], {a, 1, 10, 1}] may help ... Jens > (Mathematica 6.0, Windows XP, OLD PC) Manipulate[expr,{n,1,10}] is supposed to evaluate expr for each value > of 'n'. There seems to be a synchronization problem between Manipulate[] and > completing evaluation of expr, when there is a Graphics inside expr. I have a simple example below, where expr is a function, which > displays 'n'. ---- CODE ----------------- process[a_] := Graphics[ {Text[StringJoin[a=, ToString[a]]]}, > ImageSize -> {40} ] Manipulate[ process[a], {a, 1, 10, 1} ] ---- END CODE ----------------------- If you run the above, and click on 'play' and look at the display > inside the Graphics window, you will see that not every integer is > being printed. i.e. NOT each 'n' is being displayed. Some values of 'n' are skipped. What is being displayed is something > like 2,4,6... or 1,2,3,5,6,... instead of 1,2,3,4,5,.... i.e. some numbers > do NOT get displayed, while Manipulate itself is of course is > incrementing 'n' correctly. This ofcourse might depend on speed of > the computer itself and other factors, but on my slow PC, I see this > is clearly happening. I think this happens because Manipulate is calling expr before the > previous Graphics[] which displays the text is fully flushed out to > display within the function expr. Hence, expr returns back, and Manipulate now calls it with n+1 value, > earlier 'n' in some internal Graphics buffer, and what I see is n+1 > and 'n' is missing. I need a way to make sure Graphics[] is completed inside expr before > I return back from the function, back to Manipulate, to prevent this > problem. To confirm this, when I 'slow' down Manipulate using the 'slow' > control, now I see that each number is being displayed ok. So this > clearly is telling me there is a buffer overrun problem. I need to study the documentation more, I just started using > Manipulate, but I noticed this problem. Do you think I am interpreting this ok, or am I doing something silly > elsewhere? thank you > Nasser === Subject: Re: RotationTransform Neat Example Strange Result Bytes: 1854 I get the same odd result. In the default notebook, the separation between Q's decreases when I drag a side or corner of the window and shrink it. (But the Qs don't change in size.) When the notebook window is small enough, it looks like the Help version. Changing the bounds of the Help window, OTOH, has no effect on the graphic. Bobby > Here is a statement copied out of the Neat Example from the > RotationTransform documentation. Graphics[Table[GeometricTransformation[Style[Text[Q],87.5],RotationTransf orm[a,{0,1}]],{a,Pi/5 > Range[10]}]] When this is evaluated in the documentation notebook one picture is > obtained. But when it is copied and evaluated in a fresh Default > notebook, > an entirely different picture is obtained, with the Q characters quite > separated. Can anyone explain this strange result? > -- DrMajorBob@bigfoot.com === Subject: Re: RotationTransform Neat Example Strange Result You may have figured this out by now. I did a quick double-take on this, too, but it can be completely explained by the ImageSize. If you resize either image, you can recreate the other. Since the FontSize of Q does not scale, the results look very different (and quite kaleidoscopic!) at smaller image sizes. This difference is accomplished via stylesheet. In the Reference.nb stylesheet (used by the documentation), the default ImageSize for Output cells is set to Small. In Default.nb, no explicit ImageSize is set that affects graphics, so the global setting of Automatic is used. For graphics, ImageSize->Automatic is equivalent to Medium when the graphic stands alone in a cell, but shrinks down when the window gets smaller, or when the graphic is accompanied by other items in the cell. John Fultz jfultz@wolfram.com User Interface Group Wolfram Research, Inc. > Here is a statement copied out of the Neat Example from the RotationTransform documentation. Graphics[Table[GeometricTransformation[Style[Text[Q],87.5],RotationTransf o > rm[a,{0,1}]],{a,Pi/5 > Range[10]}]] When this is evaluated in the documentation notebook one picture is > obtained. But when it is copied and evaluated in a fresh Default notebook, > an entirely different picture is obtained, with the Q characters quite > separated. Can anyone explain this strange result? === Subject: Re: anyone tried the debugger? The documentation on this feature is sparse (for the moment). The best descriptions available probably would be embedded in recent tech conference notebooks written by me available on MathSource, although these will be sparse, But, in your case, I think the problem may be relatively simple. Any code that you're debugging has to be evaluated while the debugger is turned on. Keeping track of debugging information induces a performance overhead, so debugging information isn't tracked unless you've specifically enabled the debugger and evaluated the code. If you've already evaluated your function definitions, then you can just re-evaluate them after enabling the debugger. John Fultz jfultz@wolfram.com User Interface Group Wolfram Research, Inc. Did anyone try the new 6.0 debugger? I couldn't get it to do anything > sensible. I selected a function in a module, made it a breakpoint and > then executed a call to the module. Nothing happens. I know debuggers > in lots of IDE's, but this one has me puzzled. No clear description in > the help text (that I could find) either... Naz === Subject: Re: anyone tried the debugger? Could you tell me how to use the debugger on the following? I enabled the debugger using the Evaluation/Debugger menu item and Break at Selection item in the debugger palette, which provides Print with a red box. Print also ends up in a list of breakpoints. Putting the cursor on this line and pressing enter just executes the line without breaking. OOoooo, while playing with this example I discovered what I did wrong: You have to select the whole function including brackets! Simply the function name is not enough. This is so different from common debugger behaviour (where you can have a breakpoint at any cursor insertion point) that I think this merits a line or two in the help text. === Subject: Re: slideshow presentation in Notebook format > Hello UG: Is this documented somewhere? I notice that many NBs from the Wolfram > conference have 'next' and 'prev' buttons for pagination, but I am not > sure how to make this for myself. TIA. > You can use the SlideShow palette (in the Palettes menu) to help create slide shows. Prior to version 6, slide shows included multiple copies of the slide show toolbar, which would actually serve as the page break for the slides. In version 6, the cells which force a slide show page break appear as thick gray lines in authoring mode, and the toolbar for the slide show appears in the toolbar when you switch to the Slide Show environment. John Fultz jfultz@wolfram.com User Interface Group Wolfram Research, Inc. === Subject: Re: slideshow presentation in Notebook format A small bit of advice on using the Slide Sow palette to convert a notebook into a slide show. This is that, when on converts a notebook to a slide show the original notebook is modified. If you want to retain the original notebook as well , you should make a backup copy of it first. I think that slide show conversion should actually be done non- destructively. My recommendation to WRI is that this be modified in a future release. My suggestion is that converting to a slid show should create a new notebook and leave the original unchanged. The user could then save the slide show where ever she or he wishes. --David > Hello UG: Is this documented somewhere? I notice that many NBs from the Wolfram > conference have 'next' and 'prev' buttons for pagination, but I am not > sure how to make this for myself. TIA. > You can use the SlideShow palette (in the Palettes menu) to help create slide > shows. Prior to version 6, slide shows included multiple copies of the slide > show toolbar, which would actually serve as the page break for the slides. In > version 6, the cells which force a slide show page break appear as thick gray > lines in authoring mode, and the toolbar for the slide show appears in the > toolbar when you switch to the Slide Show environment. > John Fultz > jfu...@wolfram.com > User Interface Group > Wolfram Research, Inc. === Subject: Re: why it takes forever to evaluate this integration [version 6.0] I did the integration by hand and the result is piecewise function in > (x1,x2). It is doable, though tedious. I expect Mathematica can do it much > fast, however it takes 5 hours without result yet. Maybe there are better > ways to do it in Mathematica? Simplify[ > Integrate[h1-x1 Boole[h1-x1>0 && h2-x2>0 && h1-x1>h2-x2], {h1,B1,U1}, > {h2,B2,U2}, Assumptions->B1 ] Hi Michael, I do not know if the package Piecewise at http://library.wolfram.com/infocenter/MathSource/5117/ works with version 6, but it should be worth a try. Look at the remark at the section Implementation to read, how to install it. In[1]:= << Piecewise` In[2]:= i0 = PiecewiseExpand[h1 - x1*Boole[h1 - x1 > 0 && h2 - x2 > 0 && h1 - x1 > h2 - x2]] Out[2]= Piecewise[ {{h1, h1 - x1 <= 0 || h2 - x2 <= 0 || h1 - h2 - x1 + x2 <= 0}}, h1 - x1 ] In[3]:= PiecewiseIntegrate[i0,{h1,B1,U1},{h2,B2,U2}, Assumptions->B1 tmp.txt]; !!tmp.txt DeleteFile[tmp.txt]; Out[5]= 5.2 for Linux x86 (64 bit) (June 20, 2005) processor : 0 cpu family : 15 model : 12 stepping : 0 cpu MHz : 2151.960 cache size : 512 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow up bogomips : 4313.45 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp Peter P.S.: you can find the notebook with the huge expression at http://freenet-homepage.de/Peter_Berlin/Mathe/pwIntegrate.nb === Subject: Re: LinksBar Hello Tom, I would be interested to know if you could do this in v6? I enclose a copy of a reply I received from Wolfram Support about what I think is the same issue. (I too use a Mac, with Mathematica v6 installed). Tom Dowling Reply from Wolfram Support your email to our development group, and it looks like the Go Back button is removed in version 6 for some reason. I have filed a suggestion to have this feature re-added in future releases, I am sorry for any inconvenience caused by this problem. I have included your contact information so that you can be notified when this has been resolved. Yong Huang Technical Support Wolfram Research, Inc. Hello! I've read a few earlier posts about the LinksBar issue, just > upgraded to 6.0.1 and , on my Mac anyway, I can't get the display of > the LinksBar using WindowElements SetOptions[SelectedNotebook[], > WindowToolbars -> {RulerBar, EditBar, LinksBar}] I get the Ruler and Edit toolbars, but no Links bar. Is there another way to go back from a followed link in a notebook? I understand that this is a new version of the software, but for > someone who is an uncertain user, my assumption is always that I am > doing something wrong... I would appreciate any help anyone has to offer! > Tom De Vries > === Subject: Re: LinksBar Well, it would still be nice to know if there is some other solution. I know that to streamline some things, I created a notebook with several cells that had tags already (anchor1, anchor2, anchor3, and so on, and a section of the notebook that had cells to link to, link1, link2, link3, and so on) These I had already prepared with a back link using cell tags. That way, when typing sets of notes, I could easily link within a notebook using my already prepared tags without using the back button. But this is not very elegant. Tom On Jul 14, 12:55 am, Thomas Dowling think is > the same issue. (I too use a Mac, with Mathematica v6 installed). Tom Dowling Reply from Wolfram Support your email to our development group, and it looks like the Go Back button > is removed in version 6 for some reason. I have filed a suggestion to have > this feature re-added in future releases, I am sorry for any inconvenience > caused by this problem. I have included your contact information so that you can be notified > when this has been resolved. > Yong Huang > Technical Support > Wolfram Research, Inc. > Hello! I've read a few earlier posts about the LinksBar issue, just > upgraded to 6.0.1 and , on my Mac anyway, I can't get the display of > the LinksBar using WindowElements SetOptions[SelectedNotebook[], > WindowToolbars -> {RulerBar, EditBar, LinksBar}] I get the Ruler and Edit toolbars, but no Links bar. Is there another way to go back from a followed link in a notebook? I understand that this is a new version of the software, but for > someone who is an uncertain user, my assumption is always that I am > doing something wrong... I would appreciate any help anyone has to offer! > Tom De Vries === I have two sets of data: dat1 = {{A1,2},{A2,3},{A4,1}} dat2 = {{A1,2.2},{A2,2.9},{A3,0.5},{A4,1.1}} Is there a simple way I can plot these with the {A1, A2, A3, A4} as equidistant tick marks/labels along the horizontal axis and a standard numerical vertical axis? Note the missing A3 in dat1. I could not find anything in the options of ListPlot, or in the new (6.0) Maarten van der Burgt Leuven, Belgium === Hi Maarten, > I have two sets of data: dat1 = {{A1,2},{A2,3},{A4,1}} > dat2 = {{A1,2.2},{A2,2.9},{A3,0.5},{A4,1.1}} Is there a simple way I can plot these with the {A1, A2, > A3, A4} as equidistant tick marks/labels along the > horizontal axis and a standard numerical vertical axis? > Note the missing A3 in dat1. I could not find anything in the options of ListPlot, or in There's nothing in your data that look anything like a date, so the absence One way of plotting these data is to set up an indexing scheme corresponding to your labels and use your labels as tickmarks. We can make new tick marks using lbl = First[#] & /@ dat2; tik = {#, lbl[[#]]} & /@ Range[Length@lbl] So that the first label is A1 and the last, A4. One way of converting your data so thay can be plotted is via the two functions lbl2num[l_] := ToExpression@StringTake[l, -1]; txt2plt[{x_, y_}] := {lbl2num[x], y} Which are used as follows ListPlot[{txt2plt[#] & /@ dat1, txt2plt[#] & /@ dat2}, FrameTicks -> {tik, Automatic}, Joined -> True] There are many other ways of doing this. Dave. === Just reset the ticks variable with the labels being needed. For example (using artificial data) dat = Map[ {a <> ToString[#], #} &, Range[3]] ListPlot[Column[dat, 2], Ticks -> {({Range[Length[dat]], Column[dat, 1]} // Transpose), Automatic}] For your data set, just swap 'dat' above for dat1. Note that the first label may not always appear due to the conventional plotrange. On Jul 14, 1:56 am, Maarten van der Burgt I have two sets of data: dat1 = {{A1,2},{A2,3},{A4,1}} > dat2 = {{A1,2.2},{A2,2.9},{A3,0.5},{A4,1.1}} Is there a simple way I can plot these with the {A1, A2, A3, A4} as > equidistant tick marks/labels along the horizontal axis and a standard > numerical vertical axis? > Note the missing A3 in dat1. I could not find anything in the options of ListPlot, or in the new (6.0) > Maarten van der Burgt > Leuven, Belgium === Bytes: 2241 I have two sets of data: dat1 = {{A1,2},{A2,3},{A4,1}} > dat2 = {{A1,2.2},{A2,2.9},{A3,0.5},{A4,1.1}} Is there a simple way I can plot these with the {A1, A2, A3, A4} as > equidistant tick marks/labels along the horizontal axis and a standard > numerical vertical axis? > Note the missing A3 in dat1. I could not find anything in the options of ListPlot, or in the new (6.0) I am afraid that you will have to massage your data by hand or more or less automatically depending on the real structure of your data. In the example below, first we change the text values into numerical values, and tell explicitly where, and with which label, each tick mark must be drawn. dat1 = {{A1, 2}, {A2, 3}, {A4, 1}}; dat2 = {{A1, 2.2}, {A2, 2.9}, {A3, 0.5}, {A4, 1.1}}; ListPlot[ {dat1, dat2} /. {A1 -> 1, A2 -> 2, A3 -> 3, A4 -> 4}, AxesOrigin -> {0, 0}, Ticks -> {{{1, A1}, {2, A2}, {3, A3}, {4, A4}}, Automatic}, PlotStyle -> {Directive[Red, AbsolutePointSize[5]], Directive[Blue, AbsolutePointSize[5]]}] Jean-Marc Maarten van der Burgt > Leuven, Belgium === ListPlot[ {dat1, dat2} /. {A1 -> 1, A2 -> 2, A3 -> 3, A4 -> 4}, FrameTicks -> {{{1, A1}, {2, A2}, {3, A3}, {4, A4}}, Automatic}, Frame -> True] will do it .. Jens I have two sets of data: dat1 = {{A1,2},{A2,3},{A4,1}} > dat2 = {{A1,2.2},{A2,2.9},{A3,0.5},{A4,1.1}} Is there a simple way I can plot these with the {A1, A2, A3, A4} as > equidistant tick marks/labels along the horizontal axis and a standard > numerical vertical axis? > Note the missing A3 in dat1. I could not find anything in the options of ListPlot, or in the new (6.0) > Maarten van der Burgt > Leuven, Belgium === Subject: Re: BesselK problems at large argument? These integrals are not problematic for 5.2's NIntegrate and 6.0's NIntegrate: In[1]:= $Version Out[1]= 5.2 for Linux In[2]:= Clear[expr]; expr[n_, a_, w_] := NIntegrate[r^n*BesselK[0, w*r]^2, {r, a, Infinity}] Table[expr[1, a, w], {a, .5, 1.5, .25}, {w, .5, 1.5, .25}] Table[expr[3, a, w], {a, .5, 1.5, .25}, {w, .5, 1.5, .25}] Out[4]= {{1.458, 0.524409, 0.236156, 0.120212, 0.0661115}, > {1.17992, 0.374665, 0.148751, 0.0667275, 0.0323353}, > {0.944623, 0.264446, 0.0925154, 0.0365681, 0.0156156}, > {0.751327, 0.185354, 0.0571376, 0.0199026, 0.00749098}, > {0.595004, 0.129341, 0.0351351, 0.010787, 0.00357918}} Out[5]= {{5.28291, 1.022, 0.312131, 0.121608, 0.0550112}, > {5.17388, 0.963846, 0.278494, 0.101208, 0.0422406}, > {4.9941, 0.880179, 0.236075, 0.0785991, 0.0297837}, > {4.75032, 0.780923, 0.191892, 0.0578847, 0.0197326}, > {4.45591, 0.67585, 0.15078, 0.0409175, 0.0124792}} Anton Antonov Wolfram Research, Inc. > If I understand your integrals, they can be done symbolically. $Version 5.2 for Mac OS X (June 20, 2005) Clear[expr]; expr[n_,a_, w_]=Integrate[r^n * BesselK[0, w * r]^2, > {r, a, Infinity}, Assumptions->{w>0, a>0}] (1/4)*Sqrt[Pi]*w^(-n - 1)*MeijerG[{{}, {1, (n + 2)/2}}, > {{0, (n + 1)/2, (n + 1)/2, (n + 1)/2}, {}}, a^2*w^2] Table[expr[1,a,w],{a,.5,1.5,.25}, > {w,.5,1.5,.25}] Table[expr[3, a, w], {a, .5, 1.5, .25}, > {w, .5, 1.5, .25}] Bob Hanlon Optical fiber mode calculations, at least if done programmed > straightforwardly, require evaluating integrals of r BesselK[0, w r]^2 > and r^3 BesselK[0, w r]^2 from a finite value r = a out to r = infinity, > for smallish (order unity) values of w and a , usingNIntegrateand with > all quantities real. Trying to do this for different parameter values, however, I keep > running into messages saying things like Integral failed to converge to > desired precision, or at other times BesselK[0, r] is not numerical at {r} = {5.`*^8} I don't think there's a programming error involved, because for some > values of the parameters everything comes out just fine. I'm aware that BesselK[ ] has a simple asymptotic form at large r , and > I suppose I could mess around trying to switch to it at large r , or > figure out some way to truncate the integral at some large outer limit. But, hey, BesselK is a nice smooth, non-oscillatory (and long known) > function, which decreases very rapidly at large r. Shouldn't these > integrals work OK -- or more important, is there an option I can set to > make them go OK? [This is still 5.2 on Mac OS 10.3.9.] === Subject: Re: BesselK problems at large argument? > These integrals are not problematic for 5.2's NIntegrate and 6.0's > NIntegrate: In[1]:= $Version > Out[1]= 5.2 for Linux In[2]:= Clear[expr]; > expr[n_, a_, w_] := NIntegrate[r^n*BesselK[0, w*r]^2, {r, a, > Infinity}] > Table[expr[1, a, w], {a, .5, 1.5, .25}, {w, .5, 1.5, .25}] > Table[expr[3, a, w], {a, .5, 1.5, .25}, {w, .5, 1.5, .25}] Your example works fine for me also. But try changing the starting value in the w iterator from .5 to .1 -- for me at least (using 5.2 on Mac OS X), the integration fails with error messages such as NIntegrate::singd and/or NIntegrate::inum Integrand is not numerical at = xx`*^150 (Sometimes one of these msgs, sometimes both. depending on choice of parameters.) === Subject: RE: RotationTransform Neat Example Strange Result David Park djmpark@comcast.net http://home.comcast.net/~djmpark David, If you add the options ImageSize ->180, you get something very similar to the Neat Example. Rescaling the graphics with the mouse does the same. I think that in the documentation notebooks, graphics are by default rendered to a smaller image size than in a standard notebook. The size of the 'Q' is determined by the number of 'printer' point, in casu 87.5. Maarten David Park ast.net> cc: === Subject: RotationTransform Neat Example Strange Result 13/07/2007 12:15 Here is a statement copied out of the Neat Example from the RotationTransform documentation. Graphics[Table[GeometricTransformation[Style[Text [Q],87.5],RotationTransform[a,{0,1}]],{a,Pi/5 Range[10]}]] When this is evaluated in the documentation notebook one picture is obtained. But when it is copied and evaluated in a fresh Default notebook, an entirely different picture is obtained, with the Q characters quite separated. Can anyone explain this strange result? -- David Park djmpark@comcast.net http://home.comcast.net/~djmpark/ === Subject: Re: RotationTransform Neat Example Strange Result > Here is a statement copied out of the Neat Example from the > RotationTransform documentation. Graphics[Table[GeometricTransformation[Style[Text[Q],87.5],RotationTransf orm[a,{0,1}]],{a,Pi/5 > Range[10]}]] When this is evaluated in the documentation notebook one picture is > obtained. But when it is copied and evaluated in a fresh Default notebook, > an entirely different picture is obtained, with the Q characters quite > separated. Can anyone explain this strange result? The documentation notebooks are set up so that they automatically apply ImageSize -> Small to the graphics they contain. If you add this option to your example in a regular notebook it will appear the same as in the documentation notebook. -Rob === Subject: Re: RotationTransform Neat Example Strange Result David, If you add the options ImageSize ->180, you get something very similar to the Neat Example. Rescaling the graphics with the mouse does the same. I think that in the documentation notebooks, graphics are by default rendered to a smaller image size than in a standard notebook. The size of the 'Q' is determined by the number of 'printer' point, in casu 87.5. Maarten David Park ast.net> cc: === Subject: RotationTransform Neat Example Strange Result 13/07/2007 12:15 Here is a statement copied out of the Neat Example from the RotationTransform documentation. Graphics[Table[GeometricTransformation[Style[Text [Q],87.5],RotationTransform[a,{0,1}]],{a,Pi/5 Range[10]}]] When this is evaluated in the documentation notebook one picture is obtained. But when it is copied and evaluated in a fresh Default notebook, an entirely different picture is obtained, with the Q characters quite separated. Can anyone explain this strange result? -- David Park djmpark@comcast.net http://home.comcast.net/~djmpark/ === Subject: Re: Log Error ( ? ) After posting my response, below, I saw another response indicating that you need to use Log[10,x] for the common (base-10) logarithm. Sorry for not catching that possibility. To a mathematician, log always means natural base (E) logarithm. By contrast, to an engineer, log often means base 10, whereas ln denotes the natural logarithm. (And so nearly all calculus books, kowtowing to the predilections of engineers, use ln.) Of course to a computer scientist, log would more often mean the base-2 logarithm! > Umm... Log[x-1]-2 = 0 is equivalent to x = 1+E^2, and N[1+E^2] gives 8.38906. Only bug is in your thinking the intercept should be 101. > I had a question about something I found in Mathematica 5.2... I was plotting Log[x-1]-2 with x = {0,10} and y = {-10,5} and strangely found that the graph crossed the x-axes at approximately x == 8 ... >> It should be 101 of course, but it seemed like 8. Then I did an Nsolve with the equation set to 0, and low and behold got an answer x == 8.38906. >> Is this a bug in mathematica or am I missing something here? > -- Murray Eisenberg murray@math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305 === Subject: Re: GammaDistribution versus PoissonDistribution $Version 6.0 for Mac OS X x86 (32-bit) (June 19, 2007) The Poisson distribution is discrete. pDist = PoissonDistribution[m]; PDF[pDist, x] m^x/(E^m*x!) #[pDist] & /@ {Mean, StandardDeviation} {m, Sqrt[m]} Sum[PDF[pDist, x], {x, 0, Infinity}] 1 With[{m = RandomInteger[{2, 10}]}, ListPlot[Table[ {x, PDF[PoissonDistribution[m], x]}, {x, 0, Ceiling[m + 3 Sqrt[m]]}], PlotStyle -> Red, Filling -> Axis, FillingStyle -> {{LightBlue, AbsoluteThickness[2]}}]] The Gamma distribution is continuous gDist = GammaDistribution[a, b]; PDF[gDist, x] x^(a - 1)/(b^a*E^(x/b)*Gamma[a]) #[gDist] & /@ {Mean, StandardDeviation} {a*b, Sqrt[a]*b} Integrate[PDF[gDist, x], {x, 0, Infinity}, Assumptions -> {a > 0, b > 0}] 1 Plot[Evaluate[Table[Tooltip[ PDF[GammaDistribution[a, 1], x], a = <> ToString[a]], {a, 1, 4}]], {x, 0, 8}, PlotRange -> All] Bob Hanlon > as far as I understand the GammaDistribution has two parameters: alfa and beta. With beta =1 one should get the PoissonDistribution with paramter alfa-1. > I did, just to check: > N[Table[{i, PDF[PoissonDistribution[12],i], > PDF[GammaDistribution[13,1],i] },{i,0,30}] > I got different values. > Can anyone help me in what I do wrong? > with friendly greetings, > Peter > === Subject: change slider to pointed rectangle or arrow Is there any way within Manipulate to make a slider appear as either a filled rectangle topped by a triangle -- a shape very roughly like this ^ | | _ -- or as just a filled triangle or vertical arrow? What about in a more general expression using an explicit Slider? I ask this because the help gives the following example -- Table[Slider[0.5, Appearance -> a], {a, {UpArrow, DownArrow}}] -- but I see absolutely no differences in the results as from not using the Appearance option at all. -- Murray Eisenberg murray@math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305 === The Sort included below is to cover the case when the data is not pre-sorted by labels dat1 = {{A1, 2}, {A4, 1}, {A2, 3}}; dat2 = {{A1, 2.2}, {A3, 0.5}, {A2, 2.9}, {A4, 1.1}}; xcoord = Union[Join @@ (#[[All, 1]] & /@ {dat1, dat2})]; dat = Sort /@ ({dat1, dat2} /. {x_, y_?NumericQ} :> {Position[xcoord, x][[1, 1]], y}); ListPlot[dat, PlotJoined -> True, Frame -> True, FrameTicks -> {Thread[{Range[Length[xcoord]], xcoord}], Automatic, None, None}, Epilog -> {AbsolutePointSize[4], Thread[{{Blue, Red}, Map[Point, dat, {2}]}]}] Bob Hanlon I have two sets of data: dat1 = {{A1,2},{A2,3},{A4,1}} > dat2 = {{A1,2.2},{A2,2.9},{A3,0.5},{A4,1.1}} Is there a simple way I can plot these with the {A1, A2, A3, A4} as > equidistant tick marks/labels along the horizontal axis and a standard > numerical vertical axis? > Note the missing A3 in dat1. I could not find anything in the options of ListPlot, or in the new (6.0) > Maarten van der Burgt > Leuven, Belgium === Subject: TrackedSymbols The 6.0.0 helptext (More Information) says the typical usage for TrackedSymbols uses :>. However, the example uses ->. Does someone have a simple example that shows the different behavior when TrackedSymbols uses Rule v. RuleDelayed? My tinkering hasn't yet revealed a difference, but I know it's there. Bruce === >I have two sets of data: >dat1 = {{A1,2},{A2,3},{A4,1}} >dat2 ={{A1,2.2},{A2,2.9},{A3,0.5},{A4,1.1}} >Is there a simple way I can plot these with the {A1, A2, A3, >A4} as equidistant tick marks/labels along the horizontal axis and >a standard numerical vertical axis? Note the missing A3 in dat1. >I could not find anything in the options of ListPlot, or in the new You can achieve what you want by using a custom Ticks specification. For ex= ample, ListPlot[dat1 /. {a_, b_} :> {ToExpression@StringDrop[a, 1], b}, Ticks -> {{#, A <> ToString@#} & /@ Range[4], Automatic}, PlotRange -> {{0, 5}, {0, 3.5}}] -- To reply via email subtract one hundred and four === Subject: Re: GammaDistribution versus PoissonDistribution >parameters: alfa and beta. With beta =1 one should get the >PoissonDistribution with paramter alfa-1. I did, just to check: You are incorrect here. The Poisson distribution is a discrete distribution. The gamma distribution is a continuous distribution. There are no parameters for the gamma distribution that will result in a Poisson distribution. However, there is a relationship between the Poisson distribution and gamma distribution. Specifically, suppose the number of events (n) in some specified length of time (t) has a Poisson distribution. The the time between subsequent events will have a gamma distribution with beta = 1 (an exponential distribution) and alpha = n/t. In general the time from a given event k to event k+m, will be gamma distributed with beta = m and alpha = n/t. -- To reply via email subtract one hundred and four === Subject: What's happening with Show[] in Mathematica 6? Bytes: 1128 I tryed to run older notebooks in Mathematica 6 and I have this problem: when I have the Show[] function in somewhere, it doesn't plot anything! Fro example, run this: Do[Plot[Sun[x i],{x,-3,3}],{i,1,10}] It doesn't output anything! What's the problem? === Subject: Strange Behaviour of Solve? i tried (using Mathematica 6.0) to solve a system of equations: In:=Solve[{b == g, a == (g*v/c), (b)^2 + (a)^2 == 1}, g] Out:={} But when i use In:=Solve[{b == g, a == (g*v/c), (b)^2 + (a)^2 == 1}, {a, b, g}] Out={{g -> -c/Sqrt[c^2 + v^2], b -> -c/Sqrt[c^2 + v^2], a -> -v/Sqrt[c^2 + v^2]}, {g -> c/Sqrt[c^2 + v^2], b -> c/Sqrt[c^2 + v^2], a -> v/Sqrt[c^2 + v^2]}} i suddenly get the solution for g. It seems to me, that the number of solutions for one variable depends on the number of variables i want to solve for. Is this behaviour of Solve to be expected? Andreas Maier === Subject: Strange behaviour of Simplify i'm trying to simplify the following expression In:= gamma=c Sqrt[g00])/Sqrt[c^2 g00 + g11 v^2] In:=LeafCount[gamma] Out:=52 using Simplify In:= gamma2=Simplify[gamma, {Sqrt[g00] > 0, c > 0 }] Out:=c/Sqrt[c^2 + (g11 v^2)/g00] In:=LeafCount[gamma2] Out:=44 Why is Mathematica (I'm using V6.0) able to cancel Sqrt[g00], but is not able to cancel c? I also tried ComplexityFunction->LeafCount, which should work, because In:=gamma3=1/Sqrt[1 + (g11 v^2)/(c^2 g00)] In:=LeafCount[gamma3] Out:=43 the LeafCount of gamma3 is smaller than gamma2, but it doesn' work. Can anybody tell me, how i can transform gamma to gamma3 in Mathematica? Andreas Maier === Subject: Re: annoying documentation in 6 (rant) > An example of how hype has intruded into the documentation in > Mathematica 6 is the paragraph at the top of the page > guide/NewIn60AlphabeticalListing: By far the largest release since Version 1.0 in 1988, Version 6.0 adds > a remarkable breadth of new functionality. As well as introducing > several major new fundamental concepts, it adds nearly a thousand new > functions, and significantly enhances a large fraction of all existing > Mathematica functions. I have no objection to the assertion that Mathematica 6.0 is by far the > largest release since Version 1.0, or that it adds nearly a thousand > new functions, or that it significantly enhances a large fraction of > all existing Mathematica functions. But... Must it say remarkable breadth of new functionality? Must > there be the sledge hammer of major new fundamental concepts? Is it really necessary in the documentation explicitly to remind users > as to how wonderful Mathematica, and Mathematica 6.0 in particular, is? Is this sort of stuff aimed at making folks feel good about their > purchase and use of Mathematica 6.0? Or, since the same documentation > appears on the Wolfram web site, does the problem arise from confounding > advertising with documentation? Sorry for the rant. > Let me add slightly to your rant! I don't like documentation - such as that for the new ColorData function which feels (and is) vague. This contains phrases such as: Typical collections of schemes include: (followed by a list which is certainly incomplete because it doesn't include Legacy, which you need to translate the old colour scheme! Furthermore, can someone tell me what 'collections' refers to in this context? This style of documentation suggests that the author only included those particularly unfortunate now that so many arguments and option names are specified as strings - so it isn't easy to find all the possibilities. Much of the explanation of this function only happens via the examples, and goodness knows how many extra possibilities have been coded but never documented! David Bailey http://www.dbaileyconsultancy.co.uk === Subject: Re: annoying documentation in 6 (rant) By far the largest release since Version 1.0 in 1988, Version > 6.0 adds > a remarkable breadth of new functionality. As well as introducing > several major new fundamental concepts, it adds nearly a > thousand new > functions, and significantly enhances a large fraction of all > existing > Mathematica functions. Here are two newbie observations: 1. Looks to me that Mathematica moves in opposite direction to mathematics. When I was in high school, both my math teachers emphasized that lots of work went into to give mathematics a solid base, and for example in Geometry folks spent about 2000 years just to verify that one basic stone of the foundation was not needed to the standing of the whole building. I guess it would be terrible for mathematics to add nearly a thousand new axioms every 100 years. 2. My 10 year old wants to learn programming and because he still was not fazed when I told him that his iMac already contained Java, C, Objective C, C++, python, awk, gawk,... he insisted that I replace Mathematica 4 on his machine with Mathematica 6 Student edition. After about 20 minutes I finished the installation he comes and asking what Integrate is doing. He was going over the introduction to Mathematica 6 or something similar and the second or third example was Integrate right there. I am wondering if that is the right steps to be taken for Students to fall in love with Mathematica 6. I myself when I see an Integrate anywhere near to me I duck for cover :) J=E1nos ----------------------------------------- A newbie is a newbie is a newbie (even if he has Wikipedia to help him). - Andrzej Kozlowski === Subject: Re: annoying documentation in 6 (rant) Bytes: 4721 1. These are not axioms Mathematica 6 is adding, functions. Some are implementations of functions used in math; others are functions to facilitate operating upon objects; others are functions that affect the computing environment; etc. In any case, mathematics does have a HUGE inventory of functions -- far more than one ever sees in school and far more than one ordinarily encounters even in college math. As the years pass, mathematics does not get simpler, although certainly significant advances are made when somebody realizes that seemingly disparate ideas are special instances of the same, more general concept that, if sufficiently rich, can be developed itself. 2. That's wonderful -- a teachable moment! This is one of the ways that Mathematica can motivate learning math. Now your 10-year-old may not yet be in a position to grasp what an integral is all about: Does he understand about functions f(x) and their graphs? If not, Mathemtica could help him learn about that. If so, he's ready to begin to grasp the idea of at least the definite integral (probably indefinite integral is harder, since it requires the preliminary idea of derivative, i.e., rate of change). Show the calculation of the area of a rectangle, and represent that as the area under the graph of a constant (positive) function. Next, you could do the same thing for several rectangles -- a step function. Then begin the idea of approximating the area under a curvy function via a bunch of rectangles. Etc. >> By far the largest release since Version 1.0 in 1988, Version 6.0 adds >> a remarkable breadth of new functionality. As well as introducing >> several major new fundamental concepts, it adds nearly a thousand new >> functions, and significantly enhances a large fraction of all existing >> Mathematica functions. Here are two newbie observations: 1. Looks to me tat Mathematica moves in opposite direction to > mathematics. When I was in high school, both my math teachers > emphasized that lots of work went into to give mathematics a solid base, > and for example in Geometry folks spent about 2000 years just to verify > that one basic stone of the foundation was not needed to the standing of > the whole building. I guess it would be terrible for mathematics to add > nearly a thousand new axioms every 100 years. 2. My 10 year old wants to learn programming and because he still > was not fazed when I told him that his iMac already contained Java, C, > Objective C, C++, python, awk, gawk,... he insisted that I replace > Mathematica 4 on his machine with Mathematica 6 Student edition. After > about 20 minutes I finished the installation he comes and asking what > Integrate is doing. He was going over the introduction to > Mathematica 6 or something similar and the second or third example was > Integrate right there. I am wondering if that is the right steps to be > taken for Students to fall in love with Mathematica 6. I myself when= > I see an Integrate anywhere near to me I duck for cover :) J=E1nos > ----------------------------------------- > A newbie is a newbie is a newbie (even if he has Wikipedia to help him)= =2E - Andrzej Kozlowski -- Murray Eisenberg murray@math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305 === Subject: RE: ShowLegend - Re: Error message Bytes: 4885 Hello all, Wolfram Research about this. Here is the answer I received. ---------------------------------------------------------------------------- examples to our development group. The ShowLegend is basically not supported for LogPlot and LogLogPlot, although it works well with these. Our developers are working towards correcting this issue. You can turn off the warnings and get a neat plot output by evaluating the following at the start of the notebook. Off[Ticks::ticks] I am sorry for any inconvenience caused by this problem. Vivek Joshi Technical Support Wolfram Research, Inc. support@wolfram.com === Subject: RE: ShowLegend - Re: Error message Hello Maarten, You are right, no one answered my message. I did not find a solution to it. Mind you, I do get an output that is correct so I just ignore the error message, not really good but I cannot find a better solution. Maybe this time someone will try to answer or find a solution. Robert PS: maybe if you post your problem, it might trigger someone! -----Original Message----- Cc: mathgroup@smc.vnet.net === Subject: ShowLegend - Re: Error message I did not find any replies to this message. Did you find a solution? I would be interested to hear about it since I came across the same problem this afternoon. Maarten van der Burgt Robert Pigeon eotron.ca> cc: === Subject: Error message 18/06/2007 12:59 Good day all, Could you help me understand the error message I get when evaluating the following notebook ? ---------------------------------------------------------------------------- Needs[PlotLegends`] cf := 1.33 / Sqrt[re] cft := 0.0306 / (re)^(1/7) cm := cft =96 (2924 / re) for re >= 10^6 ShowLegend[ LogLogPlot[{cf,cft,cm},{re,104,107}, PlotRange=AE{{104,107},{0.0003,0.02}}, PlotLabel=AESkin friction coefficient vs Re, PlotStyle=AE{Blue,Red,{Purple,Dashed}}, Frame=AETrue, FrameLabel=AE{Re,Skin friction coefficient CF}, GridLines=AE{Automatic,Automatic}, BaseStyle=AE{FontSize=AE12,FontWeight=AEBold}, ImageSize=AE600], { {{Graphics[{Blue,Line[{{0,0},{5,0}}]}],=C9coulement laminaire}, {Graphics[{Red,Line[{{0,0},{5,0}}]}],=C9coulement turbulent},{Graphics[{Directive[Purple,Dashed],Line[{{0,0},{5,0}}]}],=C9 coulement mixte}}, LegendSize=AE{0.7,0.2}, LegendPosition=AE{0,-0.85}, BaseStyle=AE{FontSize=AE12,FontWeight=AEBold} } ] When I run this I get the following error message: Ticks::ticks: (<<1>>) is not a valid tick specification. But I am not using Ticks explicitly. If I add Ticks I get the same error. Now, if I change the command and not use ShowLegend then everything is correct. Or if I change LogLogPlot to just Plot, I do not get the error message and, in both cases the graph is correct. It seems that the legend position is confused with the LogLogPlot command. Any idea ? Robert Robert Pigeon === Subject: Plot3d Tick-reverse in Mathematica 6??? Is there anyone who knows how to reverse ticks in Plot3D for Mathematica 6??? I've found a nice tip using Map and Reverse function for v 5.x, but this does not work in Mathematica 6. I found that its Plot3D data format is totally different from v5.x. A lot of changes after all, why didn't they simply build function like Tick-reverse??? But graphics are pretty good, though... === Subject: Re: Issue with Synchronization between Manipulate and functions On my Windows XP system with Mathematica 6.0.1, I'm seeing each integer, from 1 through 10 inclusive, displayed. Nothing skipped. I don't know whether the result should be so sensitive to the PC's strength. After all, this Manipulate is being asked to do very little. > (Mathematica 6.0, Windows XP, OLD PC) Manipulate[expr,{n,1,10}] is supposed to evaluate expr for each value > of 'n'. There seems to be a synchronization problem between Manipulate[] and > completing evaluation of expr, when there is a Graphics inside expr. I have a simple example below, where expr is a function, which > displays 'n'. ---- CODE ----------------- process[a_] := Graphics[ {Text[StringJoin[a=, ToString[a]]]}, > ImageSize -> {40} ] Manipulate[ process[a], {a, 1, 10, 1} ] ---- END CODE ----------------------- If you run the above, and click on 'play' and look at the display > inside the Graphics window, you will see that not every integer is > being printed. i.e. NOT each 'n' is being displayed. Some values of 'n' are skipped. What is being displayed is something > like 2,4,6... or 1,2,3,5,6,... instead of 1,2,3,4,5,.... i.e. some numbers > do NOT get displayed, while Manipulate itself is of course is > incrementing 'n' correctly. This ofcourse might depend on speed of > the computer itself and other factors, but on my slow PC, I see this > is clearly happening. I think this happens because Manipulate is calling expr before the > previous Graphics[] which displays the text is fully flushed out to > display within the function expr. Hence, expr returns back, and Manipulate now calls it with n+1 value, > earlier 'n' in some internal Graphics buffer, and what I see is n+1 > and 'n' is missing. I need a way to make sure Graphics[] is completed inside expr before > I return back from the function, back to Manipulate, to prevent this > problem. To confirm this, when I 'slow' down Manipulate using the 'slow' > control, now I see that each number is being displayed ok. So this > clearly is telling me there is a buffer overrun problem. I need to study the documentation more, I just started using > Manipulate, but I noticed this problem. Do you think I am interpreting this ok, or am I doing something silly > elsewhere? thank you -- Murray Eisenberg murray@math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305