Scaling a figure with #scale()

Hi all,

I would like to resize Figure 2, which was created with Lilaq, to the same size as Figure 1, which was created with matplotlib. To do this, I use the following line of code: scale(x:50%, y: 50%, figure3) .

However, as you can see in Figure 3, the caption remains stuck in its original position.

How can I make the caption follow the figure? I don’t want the caption itself to be scaled—only the figure. I also prefer resizing the plot this way because it adjusts the font size as well.

Thanks!

Hi @Tristan_Gayrard ,

the key is setting scale.reflow to true. Otherwise, Typst treats the layout as if the image was still its original size.

Does that solve your issue?

3 Likes

Thanks a lot @Mc-Zen! That’s exactly what I need :slight_smile:

1 Like