I run the root code and draw the graph, then saved the graph by macro format.
But, it shows the error message when I run this macro in the root.
I just save the graph to use macro format, but the graph cannot be reproduced.
How can I fixed it?
In addition, I want to use the x axis range from 0.0 to 1.0.
I tried to use SetRange or SetRangeUser commands in the macro, but they does
not work. Would you tell me how to adjust the x axis range?
Hi,
Thank you for your reply and I installed new version root 5.2101.
However,
I see the error message:
root [0] .x test01.C
Error in TFormula::TFormula: expression may not be 0 or have 0 length
Error in TF1::TF1: function: pimfit/ has 0 parameters instead of 1
Error in TFormula::TFormula: expression may not be 0 or have 0 length
Error in TF1::TF1: function: pipfit/ has 0 parameters instead of 1
Error in TFormula::TFormula: expression may not be 0 or have 0 length
Error in TF1::TF1: function: kpfit/ has 0 parameters instead of 1
Error in TFormula::TFormula: expression may not be 0 or have 0 length
Error in TF1::TF1: function: kmfit/ has 0 parameters instead of 1
Error in TFormula::TFormula: expression may not be 0 or have 0 length
Error in TF1::TF1: function: profit/ has 0 parameters instead of 1
Error in TFormula::TFormula: expression may not be 0 or have 0 length
Error in TF1::TF1: function: pbfit/ has 0 parameters instead of 1
root [1] .q
Would you check this?
I attached the macro ‘test01.C’ with this message! test01.C (12.6 KB)
Thank you for your reply, however, I did not modify the macro. The macro code was generated by the root (ver. 5.2101 which Rene fixed and I downloaded the SVN trunk).
I attached the graph pdf file and the macro code. The macro does not generate the same graph. Would you check this problem?
The macro you sent is also a saved macro (see the comment on top). That macro also has the same kind of problem I told you before.
Do you have the original macro ? … may be I missed something.
[quote]That is the original macro which ROOT (graph) generated. I did not do any modification for that.[/quote]I am not sure I understand. Where did the data come from? Who originated the information? How did it get from there to your test01.C file?
I run the fitting program code and the code drew the graph.
Then, I saved the graph as a pdf file. It is the test01.pdf file which I posted before. I also saved the graph as a ROOT macros, and it is the test01.C macro file as same time. After that I run the macro, test01.C, and it does not generate same graph as test01.pdf and shows error message as I mentioned before. The fitting graph is not nice, but it shows strange behavior? So, Rene said he fixed the problem and I downloaded the package and I run it under the new version system, but it seems to have the problem which means pdf file graph is different from the macro graph.
This is the point.
Thank you!
[quote]I run the fitting program code and the code drew the graph. [/quote]Can you provide this code so that we can reproduce the problem? If this is not possible, can you save the Graph to .root file and sent it to us?