Teaching Scientific Computing with Julia

I think I expressed myself wrongly. Of course students use Plots. However, without us explaining the underlying recipe system. So it is like a black box to them. Thus, they could not easily build their own recipe. There are just so many other things, which I find more fundamental. For context I am talking about students in their 3rd semester.

That said I find visualization extremely important. Have seen a lot of awful plots in my life. So our focus is more on the general thing to do and to avoid, which are true for all plotting tools.

Well yes, the purpose of the recipe system is that it acts in the background to make plotting code simple without having to explain it. That’s the reason for Plots. That’s why I said, if you’re going to talk about an alternative to Plots, you have then explain why picking something without a recipe system helps pedagogy given that it silently simplifies the workflows for students. No one ever said students should understand what recipes are.

3 Likes

You don’t need to build your own recipe of course. If none exist, and you’ve got some type you want to plot, you can always do:

plot(my_object.field_with_x_data, my_object.field_with_y_data)

or whatever makes sense. The point Chris is making that recipes give package authors the ability to take the burden of extracting the relevant data into a “plottable” format off of the end user. Take my SynthControl package, here’s how you plot a fitted model:

Of course users could build such a plot themselves, but the recipe allows them to get the kind of visualization that’s most commonly used for this type of model with one line of code. Also to adapt this code (e.g. to add confidence intervals [if I ever get around to implementing them :joy: ]) they wouldn’t need to build a recipe, they could just do plot!(whatever change they want to make) on the existing plot, using normal Plots.jl syntax, not recipe syntax.

11 Likes