In previous versions of Mathematica I called packages using Get[package.m].
The graphics output produced in the package by functions such as Plot , ListPlot etc. would show in the notebook where the Get command was executed.
This doesn’t work in version 9. How can I restore the previous behavior?
The output from Print still displays.
Did you jump from version 5 to version 9? I am going to guess that you did. If the explanation below does not help, please attach a notebook that demonstrates the problem.
Since Mathematica 6, graphics have been the actual output of the plotting function. (Before 6, they were placed in the notebook as side effects.) Placing a semicolon after the plotting function prevents the output plot from appearing in the notebook.
The two workarounds are:
a) Wrap the plotting function with Print, which still uses side-effects.
Thanks for your answer. Print solves my problem.
I knew about the changes in outputting graphics, but didn’t expect Print to do it.
I hope Print will not be changed too to be a pure function, although this would certainly be very elegant…
Side effects spread all over do provide a very convenient and simple way of debugging or simply monitoring execution and correctness of larger codes which never reach a finished and final state.