Tikzdevice with ggplot: overfull hbox
up vote
0
down vote
favorite
I have the following R code to generate a tikzdevice plot:
tikz(file = "plot_CIs.tex", width = 5, height = 5)
par(cex = 0.8)
ggplot(confidence_interval, aes(x = Statistic, y = Values, group = 1)) +
geom_errorbar(width = 0.1, aes(ymin = Lower_Bound, ymax = Upper_Bound)) +
geom_point(shape = 21, size = 3, fill = "white") +
labs(title = title, subtitle = subtitle) +
theme(plot.title = element_text(hjust = 0.5)) +
theme(plot.subtitle = element_text(hjust = 0.5))
In latex I then use the following:
documentclass{article}
%The package tikz is available in pgf
usepackage{tikz}
usepackage[justification=centering]{caption}
begin{document}
begin{figure}
%Do not try to scale figure in .tex or you loose font size consistency
centering
%The code to input the plot is extremely simple
input{../plot_CIs.tex}
%Captions and Labels can be used since this is a figure environment
caption{Sample output from tikzDevice}
label{plot:test}
end{figure}
end{document}
Which results in this image (in a latex pdf):

I receive the following warning when compiling the latex document:
Overfull hbox (16.35pt too wide)
which according the the log is related to:
(../plot_CIs.tex)
Overfull hbox (16.35pt too wide) in paragraph at lines 12--14
How do I fix this warning? If I were using includegraphics for my image, I would simply do:
includegraphics[width=linewidth]{plot_CIs.tx}
Is there a way to do the same using input for tikzdevice plots?
Thanks!
floats captions r tikzdevice
New contributor
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
I have the following R code to generate a tikzdevice plot:
tikz(file = "plot_CIs.tex", width = 5, height = 5)
par(cex = 0.8)
ggplot(confidence_interval, aes(x = Statistic, y = Values, group = 1)) +
geom_errorbar(width = 0.1, aes(ymin = Lower_Bound, ymax = Upper_Bound)) +
geom_point(shape = 21, size = 3, fill = "white") +
labs(title = title, subtitle = subtitle) +
theme(plot.title = element_text(hjust = 0.5)) +
theme(plot.subtitle = element_text(hjust = 0.5))
In latex I then use the following:
documentclass{article}
%The package tikz is available in pgf
usepackage{tikz}
usepackage[justification=centering]{caption}
begin{document}
begin{figure}
%Do not try to scale figure in .tex or you loose font size consistency
centering
%The code to input the plot is extremely simple
input{../plot_CIs.tex}
%Captions and Labels can be used since this is a figure environment
caption{Sample output from tikzDevice}
label{plot:test}
end{figure}
end{document}
Which results in this image (in a latex pdf):

I receive the following warning when compiling the latex document:
Overfull hbox (16.35pt too wide)
which according the the log is related to:
(../plot_CIs.tex)
Overfull hbox (16.35pt too wide) in paragraph at lines 12--14
How do I fix this warning? If I were using includegraphics for my image, I would simply do:
includegraphics[width=linewidth]{plot_CIs.tx}
Is there a way to do the same using input for tikzdevice plots?
Thanks!
floats captions r tikzdevice
New contributor
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to Tex S.E.! Please split your two questions in two separate posts.
– sztruks
4 hours ago
Done: subquestion here: tex.stackexchange.com/questions/461636/…
– user50710
1 hour ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have the following R code to generate a tikzdevice plot:
tikz(file = "plot_CIs.tex", width = 5, height = 5)
par(cex = 0.8)
ggplot(confidence_interval, aes(x = Statistic, y = Values, group = 1)) +
geom_errorbar(width = 0.1, aes(ymin = Lower_Bound, ymax = Upper_Bound)) +
geom_point(shape = 21, size = 3, fill = "white") +
labs(title = title, subtitle = subtitle) +
theme(plot.title = element_text(hjust = 0.5)) +
theme(plot.subtitle = element_text(hjust = 0.5))
In latex I then use the following:
documentclass{article}
%The package tikz is available in pgf
usepackage{tikz}
usepackage[justification=centering]{caption}
begin{document}
begin{figure}
%Do not try to scale figure in .tex or you loose font size consistency
centering
%The code to input the plot is extremely simple
input{../plot_CIs.tex}
%Captions and Labels can be used since this is a figure environment
caption{Sample output from tikzDevice}
label{plot:test}
end{figure}
end{document}
Which results in this image (in a latex pdf):

I receive the following warning when compiling the latex document:
Overfull hbox (16.35pt too wide)
which according the the log is related to:
(../plot_CIs.tex)
Overfull hbox (16.35pt too wide) in paragraph at lines 12--14
How do I fix this warning? If I were using includegraphics for my image, I would simply do:
includegraphics[width=linewidth]{plot_CIs.tx}
Is there a way to do the same using input for tikzdevice plots?
Thanks!
floats captions r tikzdevice
New contributor
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I have the following R code to generate a tikzdevice plot:
tikz(file = "plot_CIs.tex", width = 5, height = 5)
par(cex = 0.8)
ggplot(confidence_interval, aes(x = Statistic, y = Values, group = 1)) +
geom_errorbar(width = 0.1, aes(ymin = Lower_Bound, ymax = Upper_Bound)) +
geom_point(shape = 21, size = 3, fill = "white") +
labs(title = title, subtitle = subtitle) +
theme(plot.title = element_text(hjust = 0.5)) +
theme(plot.subtitle = element_text(hjust = 0.5))
In latex I then use the following:
documentclass{article}
%The package tikz is available in pgf
usepackage{tikz}
usepackage[justification=centering]{caption}
begin{document}
begin{figure}
%Do not try to scale figure in .tex or you loose font size consistency
centering
%The code to input the plot is extremely simple
input{../plot_CIs.tex}
%Captions and Labels can be used since this is a figure environment
caption{Sample output from tikzDevice}
label{plot:test}
end{figure}
end{document}
Which results in this image (in a latex pdf):

I receive the following warning when compiling the latex document:
Overfull hbox (16.35pt too wide)
which according the the log is related to:
(../plot_CIs.tex)
Overfull hbox (16.35pt too wide) in paragraph at lines 12--14
How do I fix this warning? If I were using includegraphics for my image, I would simply do:
includegraphics[width=linewidth]{plot_CIs.tx}
Is there a way to do the same using input for tikzdevice plots?
Thanks!
floats captions r tikzdevice
floats captions r tikzdevice
New contributor
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 1 hour ago
New contributor
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 6 hours ago
user50710
12
12
New contributor
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user50710 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to Tex S.E.! Please split your two questions in two separate posts.
– sztruks
4 hours ago
Done: subquestion here: tex.stackexchange.com/questions/461636/…
– user50710
1 hour ago
add a comment |
Welcome to Tex S.E.! Please split your two questions in two separate posts.
– sztruks
4 hours ago
Done: subquestion here: tex.stackexchange.com/questions/461636/…
– user50710
1 hour ago
Welcome to Tex S.E.! Please split your two questions in two separate posts.
– sztruks
4 hours ago
Welcome to Tex S.E.! Please split your two questions in two separate posts.
– sztruks
4 hours ago
Done: subquestion here: tex.stackexchange.com/questions/461636/…
– user50710
1 hour ago
Done: subquestion here: tex.stackexchange.com/questions/461636/…
– user50710
1 hour ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
user50710 is a new contributor. Be nice, and check out our Code of Conduct.
user50710 is a new contributor. Be nice, and check out our Code of Conduct.
user50710 is a new contributor. Be nice, and check out our Code of Conduct.
user50710 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461595%2ftikzdevice-with-ggplot-overfull-hbox%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to Tex S.E.! Please split your two questions in two separate posts.
– sztruks
4 hours ago
Done: subquestion here: tex.stackexchange.com/questions/461636/…
– user50710
1 hour ago