# Teaching Scientific Computing with Julia

**URL:** <https://discourse.julialang.org/t/teaching-scientific-computing-with-julia/82851>\
**Category:** Teaching & Outreach\
**Created:** [June 16, 2022, 2:32am UTC](https://discourse.julialang.org/t/teaching-scientific-computing-with-julia/82851 "2022-06-16T02:32:55Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![moeddel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/moeddel/32/18641_2.png) [@moeddel](https://discourse.julialang.org/u/moeddel)\
**Post date:** [June 17, 2022, 9:09am UTC](https://discourse.julialang.org/t/teaching-scientific-computing-with-julia/82851/21 "2022-06-17T09:09:06Z")

</div>

> [@ChrisRackauckas](#):
>
> Wait what? The whole purpose is for simplification and lectures. Recipes are the solution that makes it so you don’t have to do teach the entire type setup. Why would you want to teach students about the entire type trees of packages in order to make a plot? Why would `plot(convert(Vector{Float64},map(real,x))` be better pedagogically than `plot(x)` allowing the recipes to do the conversion?

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.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [June 17, 2022, 10:55am UTC](https://discourse.julialang.org/t/teaching-scientific-computing-with-julia/82851/22 "2022-06-17T10:55:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [June 17, 2022, 11:44am UTC](https://discourse.julialang.org/t/teaching-scientific-computing-with-julia/82851/23 "2022-06-17T11:44:49Z")

</div>

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:

```julia
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](https://github.com/nilshg/SynthControl.jl) package, here’s how you plot a fitted model:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/e/fe38c95b0ffaa0a1cf97c36f19da806db9435e44.png)

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 😂]) 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.

[Previous page](https://discourse.julialang.org/t/teaching-scientific-computing-with-julia/82851.md?page=1)
