5 Formatted code edited Jun 6 '18 at 15:43 MarcoB 39.1k55 gold badges5959 silver badges121121 bronze badges I have to do a Plot3DPlot3D of a given function. The problem is that it seems to be which takes very long but, so I would like to have an idea of how long it would be.   I am looking for the simplest way to monitor this. Here is my code (well not exactly the one iI use but iI made a simpler example) :  H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0]   Si[Theta_] := H2[Cos[Theta/2]^2]   kb = 1;   WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)* T*ΔI *T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see iI gave the PlotPoints parameter "PlotPoints" toin my Plot3D so maybe there is a way to tell to mathematicaMathematica to use the number of points heit will have to compute on the plot to make a progress bar from it. But I don't know how to do itthat.   [EDIT] As suggested in the comment of the answer below, I can use EvaluationMonitorEvaluationMonitor to help me. But However, I don't understand something. I changed my Plot3D line by replacing it bywith this for the example (all the code before is unchanged).  Plot3D[\[Eta]OuiDegenBruitTh[ThetaPlot3D[ηOuiDegenBruitTh[Theta, \[CapitalDelta]I]ΔI], {Theta, 0, Pi/2}, {\[CapitalDelta]IΔI, -Log[2], 0}, PlotPoints -> 20, EvaluationMonitor -> Print["x"]]  As written in the documentation, I should have 20*20 points in this calculation. So, so 400 calculations in the end. But when I run this line mathematicaMathematica only output me "x" 3 times. So it is like mathematicaMathematica only did 3 calculations and not 400. My problem is linked to the fact I probably misunderstood how EvaluationMonitorEvaluationMonitor works, but I don't know where I am wrong ?! [edit for MarcoB]:  [EDIT for MarcoB]: My exact line is : Monitor[Plot3D[\[Eta]OuiDegenBruitTh[Theta,Monitor[ \[CapitalDelta]I], {Theta,Plot3D[ ηOuiDegenBruitTh[Theta, ΔI], {Theta,0, Pi/2}, {\[CapitalDelta]IΔI, -Log[2], 0}, PlotPoints -> 100, MaxRecursion -> 0, EvaluationMonitor :> (x = x + 1) ], ProgressIndicator[x, {0, 200^2}]]] ]  I have to do a Plot3D of a given function. The problem is that it seems to be long but I would like to have an idea of how long it would be.   I am looking for the simplest way to monitor this. Here is my code (well not exactly the one i use but i made a simpler example) :  H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0]   Si[Theta_] := H2[Cos[Theta/2]^2]   kb = 1;   WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)* T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see i gave the parameter "PlotPoints" to my Plot3D so maybe there is a way to tell to mathematica to use the number of points he will have to compute on the plot to make a progress bar from it. But I don't know how to do it  As suggested in the comment of the answer below, I can use EvaluationMonitor to help me. But I don't understand something. I changed my Plot3D line by replacing it by this for the example (all the code before is unchanged).  Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 20, EvaluationMonitor -> Print["x"]]  As written in the documentation, I should have 20*20 points in this calculation. So 400 calculations in the end. But when I run this line mathematica only output me "x" 3 times. So it is like mathematica only did 3 calculations and not 400. My problem is linked to the fact I probably misunderstood how EvaluationMonitor works but I don't know where I am wrong ? [edit for MarcoB]: My exact line is : Monitor[Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 100, MaxRecursion -> 0, EvaluationMonitor :> (x = x + 1)], ProgressIndicator[x, {0, 200^2}]]  I have to do a Plot3D of a given function which takes very long, so I would like to have an idea of how long it would be. I am looking for the simplest way to monitor this. Here is my code (well not exactly the one I use but I made a simpler example) : H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0] Si[Theta_] := H2[Cos[Theta/2]^2] kb = 1; WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)*T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see I gave the PlotPoints parameter in my Plot3D so maybe there is a way to tell Mathematica to use the number of points it will have to compute on the plot to make a progress bar from it. But I don't know how to do that.   [EDIT] As suggested in the comment of the answer below, I can use EvaluationMonitor to help me. However, I don't understand something. I changed my Plot3D line by replacing it with this for the example (all the code before is unchanged). Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, PlotPoints -> 20, EvaluationMonitor -> Print["x"]]  As written in the documentation, I should have 20*20 points in this calculation, so 400 calculations in the end. But when I run this line Mathematica only output "x" 3 times. So it is like Mathematica only did 3 calculations and not 400. My problem is linked to the fact I probably misunderstood how EvaluationMonitor works, but I don't know where I am wrong!   [EDIT for MarcoB]: My exact line is : Monitor[ Plot3D[ ηOuiDegenBruitTh[Theta, ΔI], {Theta,0, Pi/2}, {ΔI, -Log[2], 0}, PlotPoints -> 100, MaxRecursion -> 0, EvaluationMonitor :> (x = x + 1) ], ProgressIndicator[x, {0, 200^2}] ]  4 added 298 characters in body edited Jun 5 '18 at 16:54 StarBucK 87533 silver badges1313 bronze badges I have to do a Plot3D of a given function. The problem is that it seems to be long but I would like to have an idea of how long it would be. I am looking for the simplest way to monitor this. Here is my code (well not exactly the one i use but i made a simpler example) :  H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0] Si[Theta_] := H2[Cos[Theta/2]^2] kb = 1; WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)* T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see i gave the parameter "PlotPoints" to my Plot3D so maybe there is a way to tell to mathematica to use the number of points he will have to compute on the plot to make a progress bar from it. But I don't know how to do it  As suggested in the comment of the answer below, I can use EvaluationMonitor to help me. But I don't understand something. I changed my Plot3D line by replacing it by this for the example (all the code before is unchanged).  Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 20, EvaluationMonitor -> Print["x"]]  As written in the documentation, I should have 20*20 points in this calculation. So 400 calculations in the end. But when I run this line mathematica only output me "x" 3 times. So it is like mathematica only did 3 calculations and not 400. My problem is linked to the fact I probably misunderstood how EvaluationMonitor works but I don't know where I am wrong ? [edit for MarcoB]: My exact line is : Monitor[Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 100, MaxRecursion -> 0, EvaluationMonitor :> (x = x + 1)], ProgressIndicator[x, {0, 200^2}]]  I have to do a Plot3D of a given function. The problem is that it seems to be long but I would like to have an idea of how long it would be. I am looking for the simplest way to monitor this. Here is my code (well not exactly the one i use but i made a simpler example) :  H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0] Si[Theta_] := H2[Cos[Theta/2]^2] kb = 1; WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)* T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see i gave the parameter "PlotPoints" to my Plot3D so maybe there is a way to tell to mathematica to use the number of points he will have to compute on the plot to make a progress bar from it. But I don't know how to do it  As suggested in the comment of the answer below, I can use EvaluationMonitor to help me. But I don't understand something. I changed my Plot3D line by replacing it by this for the example (all the code before is unchanged).  Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 20, EvaluationMonitor -> Print["x"]]  As written in the documentation, I should have 20*20 points in this calculation. So 400 calculations in the end. But when I run this line mathematica only output me "x" 3 times. So it is like mathematica only did 3 calculations and not 400. My problem is linked to the fact I probably misunderstood how EvaluationMonitor works but I don't know where I am wrong ? I have to do a Plot3D of a given function. The problem is that it seems to be long but I would like to have an idea of how long it would be. I am looking for the simplest way to monitor this. Here is my code (well not exactly the one i use but i made a simpler example) :  H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0] Si[Theta_] := H2[Cos[Theta/2]^2] kb = 1; WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)* T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see i gave the parameter "PlotPoints" to my Plot3D so maybe there is a way to tell to mathematica to use the number of points he will have to compute on the plot to make a progress bar from it. But I don't know how to do it  As suggested in the comment of the answer below, I can use EvaluationMonitor to help me. But I don't understand something. I changed my Plot3D line by replacing it by this for the example (all the code before is unchanged).  Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 20, EvaluationMonitor -> Print["x"]]  As written in the documentation, I should have 20*20 points in this calculation. So 400 calculations in the end. But when I run this line mathematica only output me "x" 3 times. So it is like mathematica only did 3 calculations and not 400. My problem is linked to the fact I probably misunderstood how EvaluationMonitor works but I don't know where I am wrong ? [edit for MarcoB]: My exact line is : Monitor[Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 100, MaxRecursion -> 0, EvaluationMonitor :> (x = x + 1)], ProgressIndicator[x, {0, 200^2}]]  3 added 791 characters in body edited Jun 5 '18 at 16:15 StarBucK 87533 silver badges1313 bronze badges I have to do a Plot3D of a given function. The problem is that it seems to be long but I would like to have an idea of how long it would be. I am looking for the simplest way to monitor this. Here is my code (well not exactly the one i use but i made a simpler example) :  H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0] Si[Theta_] := H2[Cos[Theta/2]^2] kb = 1; WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)* T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see i gave the parameter "PlotPoints" to my Plot3D so maybe there is a way to tell to mathematica to use the number of points he will have to compute on the plot to make a progress bar from it. But I don't know how to do it  As suggested in the comment of the answer below, I can use EvaluationMonitor to help me. But I don't understand something. I changed my Plot3D line by replacing it by this for the example (all the code before is unchanged).  Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 20, EvaluationMonitor -> Print["x"]]  As written in the documentation, I should have 20*20 points in this calculation. So 400 calculations in the end. But when I run this line mathematica only output me "x" 3 times. So it is like mathematica only did 3 calculations and not 400. My problem is linked to the fact I probably misunderstood how EvaluationMonitor works but I don't know where I am wrong ? I have to do a Plot3D of a given function. The problem is that it seems to be long but I would like to have an idea of how long it would be. I am looking for the simplest way to monitor this. Here is my code (well not exactly the one i use but i made a simpler example) :  H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0] Si[Theta_] := H2[Cos[Theta/2]^2] kb = 1; WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)* T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see i gave the parameter "PlotPoints" to my Plot3D so maybe there is a way to tell to mathematica to use the number of points he will have to compute on the plot to make a progress bar from it. But I don't know how to do it I have to do a Plot3D of a given function. The problem is that it seems to be long but I would like to have an idea of how long it would be. I am looking for the simplest way to monitor this. Here is my code (well not exactly the one i use but i made a simpler example) :  H2[x_] := If[x != 0, If[x != 1, (-x)*Log[x] - (1 - x)*Log[1 - x], 0], 0] Si[Theta_] := H2[Cos[Theta/2]^2] kb = 1; WextMaxOuiDegenBruitTh[T_, ΔI_] := (-kb)* T*ΔI ηOuiDegenBruitTh[T_, ΔI_] := WextMaxOuiDegenBruitTh[T, ΔI]/Abs[ΔI] Plot3D[ηOuiDegenBruitTh[Theta, ΔI], {Theta, 0, Pi/2}, {ΔI, -Log[2], 0}, RegionFunction -> Function[{Theta, ΔI}, -Si[Theta] < ΔI < 0], PlotPoints -> 10]  As you can see i gave the parameter "PlotPoints" to my Plot3D so maybe there is a way to tell to mathematica to use the number of points he will have to compute on the plot to make a progress bar from it. But I don't know how to do it  As suggested in the comment of the answer below, I can use EvaluationMonitor to help me. But I don't understand something. I changed my Plot3D line by replacing it by this for the example (all the code before is unchanged).  Plot3D[\[Eta]OuiDegenBruitTh[Theta, \[CapitalDelta]I], {Theta, 0, Pi/2}, {\[CapitalDelta]I, -Log[2], 0}, PlotPoints -> 20, EvaluationMonitor -> Print["x"]]  As written in the documentation, I should have 20*20 points in this calculation. So 400 calculations in the end. But when I run this line mathematica only output me "x" 3 times. So it is like mathematica only did 3 calculations and not 400. My problem is linked to the fact I probably misunderstood how EvaluationMonitor works but I don't know where I am wrong ? 2 deleted 136 characters in body edited Jun 5 '18 at 15:54 Jason B. 50.7k33 gold badges9696 silver badges202202 bronze badges 1 asked Jun 5 '18 at 15:41 StarBucK 87533 silver badges1313 bronze badges