In the previous screencast it showed how to set up and solve a set of ordinary differential
equations from an initial value problem to make a plot of the results.
So here we'll show a few of the things that can make the plots look better, and then also
add comments.
So all we need to do to enter comments, if I hit the down arrow you'll see this horizontal
line.
When I select this I can select plain text and then I can put in text that does not correspond
to any command to Mathematica, it's just to explain what this program solution is about,
and I can enter more information.
We can look at the plot, this is the plot we obtained from these commands, but if I
want the plot to have certain attributes I can easily change those in the plot commands.
So within the plot command I am going to put a comma here.
I am going to add a frame, capital letter, dash, and the right arrow.
True means a frame will show up.
Now if I hit Shift+Enter it put a frame around the plot.
If I want to label the axis of the frame we can go back into the plot command, another
comma, the command is FrameLabel, again a dash and a right arrow.
Within these brackets I am going to type in what I want on the axis, where each of them
is in quotes.
First I am going to put this on a new line to make it easier to see, so Enter.
So it's x-axis first, and then y-axis.
The x-axis is time, and the y-axis is concentration.
So now Shift+Enter, you'll notice on the plot I have concentration labeled on the y-axis,
and time labeled on the x-axis.
Again, also put a title, essentially a label for this frame.
Again within the plot command another comma, and the command is Plotlabel, and the arrow,
style, and then square brackets for functions.
So what I want to show up is in quotes, and I am just going to call this "Batch Reactor".
Hitting Shift+Enter I create a label on the top.
If I like to have a larger font within this PlotLabel[Style], I can again put a comma
and indicate the font size, again the arrow, and let's try 16.
Hit Shift+Enter, and we have a bigger font.
We can also change the thickness of the lines, it's in the plot command, let's add it in
here, so the command is PlotStyle, again the arrow, and thickness, and now square brackets
and the thickness is going to be 0.005, and remember I have to now put a comma after this
option.
This corresponds to a half percent of the height of the graph.
Shift+Enter, you can see the lines got thicker.
Now I could have put some of the commands that I want to show for my plot, I could just
Set at the beginning SetOptions, and then brackets, this is for the Plot function.
So I could have said Frame here and it'll automatically set up the frame, and let's
just remove it from here so we're not having the command twice, and I could set some other
options.
One is the LabelStyle.
Again, the arrow, and within brackets.
So I want a certain font to show up, I'll like Arial, and it has to be in quotes.
If I put a comma here I can also add another command for the font size, and let's go with
14, semicolon.
So now I've added these options, and I could just copy this for example for every program.
Again Shift+Enter, and now the fonts have changed to Arial, and now they're size 14.
There're lots of other options in terms of making the graphs easier to read, for now
we'll stop with just these, being able to solve the differential equation quickly in
Mathematica, and then picking some options to make the plot easier to read and understand.