Java教程

Use `expression()` to print math notations on plots in R

本文主要是介绍Use `expression()` to print math notations on plots in R,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

目录
  • 1 Basic operators
  • 2 Large-scale operators
  • 3 Upper and lower markers
  • 4 Arrows
  • 5 Set operations
  • 6 Derivative notations
  • 7 Special typefaces
  • 8 Greek alphabet

?plotmath

1 Basic operators

Syntax Meaning
%*% \(\times\)
%/% \(\div\)
%+-% \(\pm\)
x%%y \(x \cdot y\)
sqrt(x) \(\sqrt{x}\)
sqrt(x, y) \(\sqrt[y]{x}\)
%prop% \(\propto\)
infinity \(\infty\)
== \(=\)
%==% \(\equiv\)
>= \(\geq\)
<= \(\leq\)
frac(x, y) \(\frac{x}{y}\)
x%~~%y \(x \approx y\)
x%=~%y \(x \approxeq y\)

2 Large-scale operators

Syntax Meaning
integral(f(x)*dx, a, b) \(\displaystyle \int_{a}^{b} f(x) dx\)
sum(f(x), a, b) \(\displaystyle \sum_a^b f(x)\)
prod(f(x), a, b) \(\displaystyle \prod_a^b f(x)\)
union(A[i], i==1, n) \(\displaystyle \cup_{i = 1}^n A_i\)
intersect(A[i], i==1, n) \(\displaystyle \cap_{i = 1}^n A_i\)
lim(f(x), x>0) \(\displaystyle \lim_{x \rightarrow 0} f(x)\)
min(f(x), x>0) \(\displaystyle \min_{x > 0} f(x)\)
bgroup("(",atop(x, y),")") \(x \choose y\)

3 Upper and lower markers

Syntax Meaning
a^b \(a^b\)
a[b] \(a_b\)

4 Arrows

Syntax Meaning
%<->% \(\leftrightarrow\)
%->% \(\rightarrow\)
%<-% \(\leftarrow\)
%up% \(\uparrow\)
%down% \(\downarrow\)
%<=>% \(\Leftrightarrow\)
%=>% \(\Rightarrow\)
%<=% \(\Leftarrow\)
%dblup% \(\Uparrow\)
%dbldown% \(\Downarrow\)

5 Set operations

Syntax Meaning
x %subset% y \(x \sub y\)
x %subseteq y \(x \subseteq y\)
x %supset% y \(x \supset y\)
x %supseteq% y \(x \supseteq y\)
x %in% y \(x \in y\)
x %notin% y \(x \notin y\)

6 Derivative notations

Syntax Meaning
hat(x) \(\hat{x}\)
tilde(x) \(\tilde{x}\)
dot(x) \(\dot{x}\)
bar(X) \(\bar{x}\)
widehat(xy) \(\widehat{xy}\)
widetilde(xy) \(\widetilde{xy}\)
partialdiff \(\partial\)
nabla \(\nabla\)

7 Special typefaces

Syntax Meaning
plain(x) x
bold(x) x
italic(x) x
bolditalic(x) x
underline(x) x

8 Greek alphabet

Syntax Meaning Syntax Meaning
alpha or symbol(a) \(\alpha\) Alpha or symbol(A) \(\Alpha\)
beta or symbol(b) \(\beta\) Beta or symbol(B) \(\Beta\)
gamma or symbol(g) \(\gamma\) Gamma or symbol(G) \(\Gamma\)
delta or symbol(d) \(\delta\) Delta or symbol(D) \(\Delta\)
epsilon or symbol(e) \(\epsilon\) Epsilon or symbol(E) \(\Epsilon\)
zeta or symbol(z) \(\zeta\) Zeta or symbol(Z) \(\Zeta\)
eta or symbol(h) \(\eta\) Eta or symbol(H) \(\Eta\)
theta or symbol(q) \(\theta\) Theta or symbol(Q) \(\Theta\)
iota or symbol(i) \(\iota\) Iota or symbol(I) \(\Iota\)
kappa or symbol(k) \(\kappa\) Kappa or symbol(K) \(\Kappa\)
lambda or symbol(l) \(\lambda\) Lambda or symbol(L) \(\Lambda\)
mu or symbol(m) \(\mu\) Mu or symbol(M) \(\Mu\)
nu or symbol(n) \(\nu\) Nu or symbol(N) \(\Nu\)
xi or symbol(x) \(\xi\) Xi or symbol(X) \(\Xi\)
o or symbol(o) \(\omicron\) O or symbol(O) \(\Omicron\)
pi or symbol(p) \(\pi\) Pi or symbol(P) \(\Pi\)
rho or symbol(r) \(\rho\) Rho or symbol(R) \(\Rho\)
sigma or symbol(s) \(\sigma\) Sigma or symbol(S) \(\Sigma\)
tau or symbol(t) \(\tau\) Tau or symbol(T) \(\Tau\)
upsilon or symbol(u) \(\upsilon\) Upsilon or symbol(U) \(\Upsilon\)
phi or symbol(f) \(\phi\) Phi or symbol(F) \(\Phi\)
chi or symbol(c) \(\chi\) Chi or symbol(C) \(\Chi\)
psi or symbol(y) \(\psi\) Psi or symbol(Y) \(\Psi\)
omega or symbol(w) \(\omega\) Omega or symbol(W) \(\Omega\)
varphi or symbol(j) \(\varphi\) symbol(V) \(\varsigma\)
symbol(v) \(\varpi\) symbol(J) \(\vartheta\)
这篇关于Use `expression()` to print math notations on plots in R的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!