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):
tikzout



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!










share|improve this question









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















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):
tikzout



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!










share|improve this question









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













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):
tikzout



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!










share|improve this question









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):
tikzout



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






share|improve this question









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.











share|improve this question









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.









share|improve this question




share|improve this question








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


















  • 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















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






user50710 is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















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






























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.










 

draft saved


draft discarded


















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.















 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Lallio

Futebolista

Jornalista