logo

How to Adjust the Aspect Ratio of a Julia Set Picture 📂Julia

How to Adjust the Aspect Ratio of a Julia Set Picture

Overview 1

To adjust the width and height of the figure, you can include the ratio option. Other recommended aliases include aspect_ratios, axis_ratio.

  • ratio = :none: The default value, where the figure’s size is adjusted to fit the ratio.
  • ratio = :equal: Regardless of the figure’s size, the x and y axes are adjusted to a one-to-one ratio.
  • ratio = Number: The ratio is adjusted according to Number. Number is given as the ratio in ${{세로} \over {가로}} = {{\Delta y} \over {\Delta x}}$.

Code

using Plots

x = rand(100)
y = randn(100)

plot(x,y,seriestype = :scatter, ratio = :none)
png("none")
plot(x,y,seriestype = :scatter, ratio = :equal)
png("equal")
plot(x,y,seriestype = :scatter, ratio = 0.5)
png("0.5")
plot(x,y,seriestype = :scatter, ratio = 1)
png("1")
plot(x,y,seriestype = :scatter, ratio = 2)
png("2")

Default :none

none.png

plot(x,y,seriestype = :scatter, ratio = :none)

One-to-One :equal

equal.png

plot(x,y,seriestype = :scatter, ratio = :equal)

Specific Ratio Number

Number is given as the ratio in ${{세로} \over {가로}}$.

0.5.png

plot(x,y,seriestype = :scatter, ratio = 0.5)

1.png

plot(x,y,seriestype = :scatter, ratio = 1)

2.png

plot(x,y,seriestype = :scatter, ratio = 2)

Environment

  • OS: Windows
  • julia: v1.6.3