# Multiple plots: some refinements

**URL:** <https://discourse.julialang.org/t/multiple-plots-some-refinements/64800>\
**Category:** Visualization\
**Tags:** graphics, plots, gr, makie\
**Created:** [July 17, 2021, 8:30am UTC](https://discourse.julialang.org/t/multiple-plots-some-refinements/64800 "2021-07-17T08:30:30Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [July 21, 2021, 11:29am UTC](https://discourse.julialang.org/t/multiple-plots-some-refinements/64800/21 "2021-07-21T11:29:34Z")

</div>

Is it possible to set `Computer Modern` as the legend font, to keep the fonts consistent?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [July 21, 2021, 2:04pm UTC](https://discourse.julialang.org/t/multiple-plots-some-refinements/64800/22 "2021-07-21T14:04:37Z")

</div>

Can you try `]up` so that you get `GridLayoutBase.jl v.0.5.7`? It should work now:

```julia
f = Figure(font = "NewCM10-Regular.otf")
ls = []
for i in 1:4
    for j in 1:i
        ax = Axis(f[i, j], width = 100, height = 100, ylabel = "y label")
        push!(ls, lines!(ax, 0..10, sin, color = rand(RGBf0)))
        if i == j && j > 1
            ax.yaxisposition = :right
            if j < 4
                ax.alignmode = Mixed(right = MakieLayout.Protrusion(0))
            end
        elseif j > 1
            hideydecorations!(ax, grid = false)
        end
        if i < 4
            hidexdecorations!(ax, grid = false)
        end
    end
end
Legend(f[1, 4], ls, string.(1:10), halign = :right, valign = :top,
    tellwidth = false, nbanks = 3)
resize!(f.scene, f.layout.layoutobservables.reportedsize[]...)
save("test.pdf", f)

```

 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/3/1/31c09e13f0866130b07b88917380a9c27a4e2522.png)

@lmiq as you can see, you can use a computer-modern like font for everything (for some reason in this case it only worked when giving the full path, though)

---

<div class="post-metadata">

**Author:** ![marcobonici](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marcobonici/32/20549_2.png) [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Post date:** [July 21, 2021, 4:37pm UTC](https://discourse.julialang.org/t/multiple-plots-some-refinements/64800/23 "2021-07-21T16:37:30Z")

</div>

And…here we are!

 ![contour](https://global.discourse-cdn.com/julialang/original/3X/d/6/d6170804a82a1d1d3451af1d8bf68d2de6f785b5.png)  
The subplots size is _exactly_ the one I wanted. The subplots are near, as I wanted. I have used LaTeX almost everywhere. This is great!  
Now I need to write the code a bit better before posting, @liuyxpp . Furthermore, I have to understand why I cannot set `NewCM10-Regular.otf` as the legend font, but this is probably an issue related to my self. Thank you again @jules !

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [July 21, 2021, 5:03pm UTC](https://discourse.julialang.org/t/multiple-plots-some-refinements/64800/24 "2021-07-21T17:03:28Z")

</div>

Yeah you have to have the font file that I used of course 😉 Just wanted to show there’s no magic to it

---

<div class="post-metadata">

**Author:** ![marcobonici](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marcobonici/32/20549_2.png) [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Post date:** [July 22, 2021, 12:02am UTC](https://discourse.julialang.org/t/multiple-plots-some-refinements/64800/25 "2021-07-22T00:02:27Z")

</div>

It was easy, in the end…and here the final result!

 ![contour](https://global.discourse-cdn.com/julialang/original/3X/c/7/c744a5ddb53e93d787b89a673e8324a11563f654.png)  
Hopefully tomorrow I’ll write the code in a better way, such that I can post it @liuyxpp 😉

---

<div class="post-metadata">

**Author:** ![marcobonici](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marcobonici/32/20549_2.png) [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Post date:** [November 2, 2021, 4:33pm UTC](https://discourse.julialang.org/t/multiple-plots-some-refinements/64800/26 "2021-11-02T16:33:34Z")

</div>

So, after some time (I had a couple of things to do) I managed to write (almost) what I wanted.  
Here is the result

 ![contour](https://global.discourse-cdn.com/julialang/original/3X/e/a/ea90cf4d574f25ab5617448f0aa0a2b0f171575e.jpeg)  
I am quite satisfied. I have divided the process in two steps:

1. First, I create the structure with all the the square boxes, with the limits, ticks, and labels I want. These boxes are empty, they do not contain enything
2. Then I draw the Fisher contours I want.  
This is quite useful, for several reason. The first step is the longest one, and I am wondering if I can create a deepcopy of the figure, to create a “white canvas” to be used repeatedly.  
However, when I make a deepcopy of the Figure, I receive a error message.

> `deepcopy of Modules not supported`

Do you have any suggestion? If you want, I can share the code if useful. Let me know.  
Thank you,  
Marco

[Previous page](https://discourse.julialang.org/t/multiple-plots-some-refinements/64800.md?page=1)
