-
줄리아에서 시스템 이미지로 패키지 로드 속도 빠르게 하는 법
julia -J sysimage.so
using PackageCompiler
create_sysimage(["Plots"], sysimage_path="sys_plots.so", precompile_execution_file="precompile_plots.jl")
"julia.environmentPath": "C:\\Users\\대식\\path\\to\\your\\project",
"julia.additionalArgs": [
"--sysimage",
"C:\\Users\\대식\\path\\to\\sys_plots.so"
]
이거 글 좀 크다… 쉽게 끝날 일이 아님
줄리아 패키지 설치 속도 확인하는 법
https://discourse.julialang.org/t/any-way-to-speed-up-loading-large-precompiled-packages/98762/11
@time_import
줄리아 막대그래프에서 테두리 없애는 법 lw = 0
줄리아에서 데이터 읽어들일 때 깨지는 인코딩 문제 해결
https://github.com/JuliaStrings/StringEncodings.jl
줄리아 GR 백엔드 폰트 목록
https://gr-framework.org/fonts.html
다항함수 인터폴레이션의 실제 구현(수치해석)
using Plots, Polynomials
function interpolate(xs, ys)
V = [x^(i-1) for x in xs, i in 1:length(xs)]
coeffs = V \ ys
return Polynomial(coeffs)
end
foo = sort(rand(5))
bar = randn(5)
p = interpolate(foo, bar)
plot(0:0.01:1, p.(0:0.01:1))
scatter!(foo, bar)
근데 이것보단 원래 있는 API로 하는 게 나을듯
https://juliamath.github.io/Polynomials.jl/stable/reference/#Polynomials.fit
줄리아 히트맵에서 특정 부붙 투명하게 남겨두는 법
# 색상은 1일 때만 빨간색, 나머지는 아무것도 렌더링되지 않도록
heatmap!(vf, x_, y_, nc_x',
alpha = nc_x',
color = [:transparent, :red],
colorbar = :none,
transpose = true
)
텍 여러가지 화살표
\gets \to \implies \iff \impliedby \mapsto \longimplies
텍 소수점 정렬
\documentclass{article} \usepackage{array, siunitx}
\begin{document}
\begin{table}[h] \centering \begin{tabular}{S[table-format=3.2]} \hline {값} \ \hline 12.3 \ 4.56 \ 123.4 \ 78.91 \ \hline \end{tabular} \caption{소수점을 기준으로 정렬된 테이블} \end{table}
\end{document}
텍 등호 정렬
\documentclass{article}
\usepackage{breqn} % 자동 줄바꿈과 등호 정렬
\begin{document}
\begin{dmath}
dx = -0.018 x^{2} + 0.023 x y - 0.008 y^{2} + 0.033 x^{3} - 0.083 x^{2} y + 0.065 x y^{2} - 0.012 y^{3} + 0.02 x^{4} - 0.093 x^{3} y + 0.169 x^{2} y^{2} - 0.137 x y^{3} + 0.038 y^{4} - 0.037 x^{5} + 0.192 x^{4} y - 0.412 x^{3} y^{2} + 0.447 x^{2} y^{3} - 0.244 x y^{4} + 0.054 y^{5} + 0.011 x^{6} - 0.066 x^{5} y + 0.173 x^{4} y^{2} - 0.241 x^{3} y^{3} + 0.188 x^{2} y^{4} - 0.077 x y^{5} + 0.013 y^{6}
\end{dmath}
\begin{dmath}
dy = 0.009 + 0.006 x - 0.003 y + 0.005 x^{2} - 0.005 y^{2} - 0.025 x^{3} + 0.073 x^{2} y - 0.086 x y^{2} + 0.034 y^{3} - 0.025 x^{4} + 0.109 x^{3} y - 0.157 x^{2} y^{2} + 0.094 x y^{3} - 0.018 y^{4} + 0.068 x^{5} - 0.362 x^{4} y + 0.771 x^{3} y^{2} - 0.82 x^{2} y^{3} + 0.439 x y^{4} - 0.095 y^{5} - 0.027 x^{6} + 0.175 x^{5} y - 0.472 x^{4} y^{2} + 0.677 x^{3} y^{3} - 0.547 x^{2} y^{4} + 0.236 x y^{5} - 0.042 y^{6}
\end{dmath}
\end{document}
텍 서수 표현
1\textsuperscript{st}, 2\textsuperscript{nd}
텍 투칼럼에서 긴 수식 한 칼럼으로 확장하는 법 \usepackage{cuted}
\documentclass[twocolumn]{article}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{cuted}
\begin{document}
\title{Two-column Document with Wide Equation}
\author{Daesick Ryu}
\maketitle
\section{Introduction}
\lipsum[1]
\section{Main Content}
\lipsum[2]
% 긴 수식을 한 칼럼으로 확장해서 표시
\begin{strip}
\begin{equation}
E = mc^2 + \frac{1}{2}mv^2 + \int_{0}^{\infty} \frac{\sin(x)}{x} \, dx + \sum_{n=1}^{\infty} \frac{1}{n^2} + u_{xx} + u u_{y} + x^{6} y + \tanh{xy} + \sum_{n \in \mathbf{Z}} \gamma(n)
\end{equation}
\end{strip}
\lipsum[3-4]
\end{document}
줄리아 라벨에 다른 내용 쓰는 법

using Plots
plot(randn(10), xticks = (1:10, 'a':'j'))
plot(randn(10), xticks = (2:2:10, 'A':'E'))
줄리아 레이텍 문자열에서의 보간법
https://github.com/JuliaStrings/LaTeXStrings.jl
https://discourse.julialang.org/t/plots-string-interpolation-in-labels/10799/4

using Plots, LaTeXStrings
t = 0:.01:2π
plt_ = []
for k = 1:4
push!(plt_, plot(t, sin.(k*t), title = L"\sin(%$k t)",
xticks = ([0, π, 2π], ["0", "π", "2π"])))
end
plot(plt_..., legend = :none)

저희들의 저서 「줄리아 프로그래밍」이 2024 세종도서 학술부문에 선정되었습니다!

