2
나는 writng 종이이고 나는 내 플롯에 R을 사용하고있다. 저널 가이드 라인은 음모의 전설이 그림 캡션에 있어야한다고 말합니다. 그래서 가능한지, 그리고 LaTeX의 캡션에 R 기호와 색상을 사용하는 방법을 알고 싶습니다.LaTeX의 그림 캡션에 ggplot의 기호와 색상을 사용하는 방법은 무엇입니까?
또한 빨간색 원이 컴파일 된 문서에 나타나지 않습니다. R
library(ggplot2)
A <- seq(0, 10, by = 1)
B <- seq(0, 20, by = 2)
C <- seq(0, 30, by = 3)
DF <- data.frame(A, B, C)
pdf(
file = "Figure1.pdf",
width = 8/2.54,
height = 5/2.54,
pointsize = 8
)
ggplot(data = DF) +
geom_point(aes(x = 0:10, y = A, color = "A", shape = "A")) +
geom_point(aes(x = 0:10, y = B, color = "B", shape = "B")) +
geom_point(aes(x = 0:10, y = C, color = "C", shape = "C")) +
scale_shape_manual(name = "Legend", values = c(0, 1, 2)) +
scale_color_manual(name = "Legend", values = c("black", "red", "blue"))
dev.off()
LaTeX 문서
\documentclass[10pt,a4paper, twocolumns]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
This is a test\par
%
\begin{figure}[htb]
\centering
\includegraphics{Figure1.pdf}
\caption{I want here the symbols and colors that were used in R}
\label{fig:figure1}
\end{figure}
\end{document}
모든 도움말
는플롯?
관련 : https://stackoverflow.com/q/35936319/471093 https://tex.stackexchange.com/questions/102925/how-can -i-insert-the-symbols-a-figure https://github.com/baptiste/caption의 기호를 삽입하십시오. – baptiste