줄리아에서 그림 축, 눈금 등 다 없애고 깔끔하게 출력하는 법 📂줄리아

줄리아에서 그림 축, 눈금 등 다 없애고 깔끔하게 출력하는 법

How to Plot a Clean figure in Julia Plots without Axes, Grids, Thicks, or Other Markings

코드

Plots.jl는 기본적으로 그리드, 눈금, 축, 컬러바 등을 모두 출력하는데, 이를 없애고 깔끔하게 그리고 싶다면 다음의 옵션을 추가하면 된다.

  • colorbar=:none: 컬러바를 지운다.
  • showaxis = false: 축과 눈금을 지운다.
  • grid=false: 배경의 그리드를 지운다.
  • ticks=false: 배경의 그리드와 눈금을 지운다.
  • framestyle=:none: 배경의 그리드와 축을 지운다.
using Plots

surface(L, title="default")
surface(L, title="colorbar=:none", colorbar=:none)
surface(L, title="showaxis=false", showaxis=false)
surface(L, title="grid=false", grid=false)
surface(L, title="ticks=false", ticks=false)
surface(L, title="framestyle=:none", framestyle=:none)
surface(L, title="all off", ticks=false, framestyle=:none, colorbar=:none)

fig1.png

fig2.png

fig3.png

fig4.png

fig5.png

fig6.png

fig7.png

환경

  • OS: Windows11
  • Version: Julia v1.8.3, Plots v1.38.6
댓글