fit the plot to the entire page in pgfplotsUse BPchem Numbering As Labels in a PGFPlotplotting two time series with boundsGrouped bar chartHow do i get the x axis on top but keep a line on the bottomGraphing trigonometric functions, axes labeled with tick marksHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?How to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphpgfplots: percentage in matrix plotCenter the axes in the coordinate origin

Information to fellow intern about hiring?

Why do UK politicians seemingly ignore opinion polls on Brexit?

Patience, young "Padovan"

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

How to move the player while also allowing forces to affect it

Could a US political party gain complete control over the government by removing checks & balances?

How can I fix this gap between bookcases I made?

Need help identifying/translating a plaque in Tangier, Morocco

Is Social Media Science Fiction?

I see my dog run

Manga about a female worker who got dragged into another world together with this high school girl and she was just told she's not needed anymore

What does 'script /dev/null' do?

Lied on resume at previous job

extract characters between two commas?

Is every set a filtered colimit of finite sets?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Is "plugging out" electronic devices an American expression?

Is there a way to make member function NOT callable from constructor?

Email Account under attack (really) - anything I can do?

Finding files for which a command fails

What does "enim et" mean?

Is Fable (1996) connected in any way to the Fable franchise from Lionhead Studios?

Could Giant Ground Sloths have been a Good Pack Animal for the Ancient Mayans

Shall I use personal or official e-mail account when registering to external websites for work purpose?



fit the plot to the entire page in pgfplots


Use BPchem Numbering As Labels in a PGFPlotplotting two time series with boundsGrouped bar chartHow do i get the x axis on top but keep a line on the bottomGraphing trigonometric functions, axes labeled with tick marksHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?How to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphpgfplots: percentage in matrix plotCenter the axes in the coordinate origin













0















I use PGFPlots to create graphs and export them into my keynote slides. I always have to trim the sides of the exported pdf file. Attached is an example of such a graph.enter image description here I wonder if there is a way to automatically fit the plot into the whole page in the pdf file?



Here is the code that produces the graph



documentclass[a4paper]article

usepackageamsmath
usepackagexcolor
usepackagepgfplots
usepackagepgfplotstable%fitting functions
usepackagetikz
usetikzlibrarytikzmark,patterns,pgfplots.fillbetween

pagestyleempty

pgfkeys/pgf/number format/.cd,fixed

pgfplotssetcompat=1.15
pgfplotssetlabel style=font=LARGE,
tick label style=font=LARGE

pgfplotsseterror bars/.cd,
x dir=both, x explicit,
y dir=both, y explicit,


begindocument


beginfigure
centering
begintikzpicture
beginaxis[
enable tick line clipping=false, % makes all ticks same width
axis line style=semithick,
width=14cm,
height=7cm,
x tick style=black,semithick,
x label style=
at=(ticklabel cs:0.5),anchor=near ticklabel,
xlabel=$L$ [mm],
xmin=0,xmax=100,
xtick=0,20,...,100,
xtick pos=bottom,
xtick align=outside,
y tick style=black,semithick,
y label style=
at=(ticklabel cs:0.5),anchor=near ticklabel,
ylabel=$F$ [N],
ymin=-0.05,ymax=0.2,
ytick=-0.05,0,...,0.25,
ytick pos=left,
ytick align=outside,
]
addplot [only marks,mark=*,mark options=scale=0.5,red,fill=white] file LDPE_PETG_2.txt;

addplot [only marks,mark=*,mark options=scale=0.5,blue,fill=white] file LDPE-DOTO_PETG_2.txt;

endaxis
endtikzpicture
endfigure

enddocument









share|improve this question
















bumped to the homepage by Community 47 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Did you try pgfplotssetwidth=textwidth,height=textheight? Or just replace width=14cm, height=7cm, by width=textwidth,height=textheight,

    – marmot
    Mar 9 at 21:08







  • 2





    If you are exporting the plots, why not use standalone class? Don't use figure, and if you need a caption use` captionoffigure...` (caption or capt-of packages).

    – John Kormylo
    Mar 10 at 0:04












  • Thank you @John Kormylo, documenstcalssstandalone does the job. Moreover, I can perfectly fit it to the page and still use the width=xcm and height=ycm to adjust the plot size.

    – Gagik
    Mar 11 at 1:10











  • Another alternative would be to use TikZ's external (tikz-external) library to export your plots.

    – Stefan Pinnow
    Mar 11 at 20:26
















0















I use PGFPlots to create graphs and export them into my keynote slides. I always have to trim the sides of the exported pdf file. Attached is an example of such a graph.enter image description here I wonder if there is a way to automatically fit the plot into the whole page in the pdf file?



Here is the code that produces the graph



documentclass[a4paper]article

usepackageamsmath
usepackagexcolor
usepackagepgfplots
usepackagepgfplotstable%fitting functions
usepackagetikz
usetikzlibrarytikzmark,patterns,pgfplots.fillbetween

pagestyleempty

pgfkeys/pgf/number format/.cd,fixed

pgfplotssetcompat=1.15
pgfplotssetlabel style=font=LARGE,
tick label style=font=LARGE

pgfplotsseterror bars/.cd,
x dir=both, x explicit,
y dir=both, y explicit,


begindocument


beginfigure
centering
begintikzpicture
beginaxis[
enable tick line clipping=false, % makes all ticks same width
axis line style=semithick,
width=14cm,
height=7cm,
x tick style=black,semithick,
x label style=
at=(ticklabel cs:0.5),anchor=near ticklabel,
xlabel=$L$ [mm],
xmin=0,xmax=100,
xtick=0,20,...,100,
xtick pos=bottom,
xtick align=outside,
y tick style=black,semithick,
y label style=
at=(ticklabel cs:0.5),anchor=near ticklabel,
ylabel=$F$ [N],
ymin=-0.05,ymax=0.2,
ytick=-0.05,0,...,0.25,
ytick pos=left,
ytick align=outside,
]
addplot [only marks,mark=*,mark options=scale=0.5,red,fill=white] file LDPE_PETG_2.txt;

addplot [only marks,mark=*,mark options=scale=0.5,blue,fill=white] file LDPE-DOTO_PETG_2.txt;

endaxis
endtikzpicture
endfigure

enddocument









share|improve this question
















bumped to the homepage by Community 47 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Did you try pgfplotssetwidth=textwidth,height=textheight? Or just replace width=14cm, height=7cm, by width=textwidth,height=textheight,

    – marmot
    Mar 9 at 21:08







  • 2





    If you are exporting the plots, why not use standalone class? Don't use figure, and if you need a caption use` captionoffigure...` (caption or capt-of packages).

    – John Kormylo
    Mar 10 at 0:04












  • Thank you @John Kormylo, documenstcalssstandalone does the job. Moreover, I can perfectly fit it to the page and still use the width=xcm and height=ycm to adjust the plot size.

    – Gagik
    Mar 11 at 1:10











  • Another alternative would be to use TikZ's external (tikz-external) library to export your plots.

    – Stefan Pinnow
    Mar 11 at 20:26














0












0








0








I use PGFPlots to create graphs and export them into my keynote slides. I always have to trim the sides of the exported pdf file. Attached is an example of such a graph.enter image description here I wonder if there is a way to automatically fit the plot into the whole page in the pdf file?



Here is the code that produces the graph



documentclass[a4paper]article

usepackageamsmath
usepackagexcolor
usepackagepgfplots
usepackagepgfplotstable%fitting functions
usepackagetikz
usetikzlibrarytikzmark,patterns,pgfplots.fillbetween

pagestyleempty

pgfkeys/pgf/number format/.cd,fixed

pgfplotssetcompat=1.15
pgfplotssetlabel style=font=LARGE,
tick label style=font=LARGE

pgfplotsseterror bars/.cd,
x dir=both, x explicit,
y dir=both, y explicit,


begindocument


beginfigure
centering
begintikzpicture
beginaxis[
enable tick line clipping=false, % makes all ticks same width
axis line style=semithick,
width=14cm,
height=7cm,
x tick style=black,semithick,
x label style=
at=(ticklabel cs:0.5),anchor=near ticklabel,
xlabel=$L$ [mm],
xmin=0,xmax=100,
xtick=0,20,...,100,
xtick pos=bottom,
xtick align=outside,
y tick style=black,semithick,
y label style=
at=(ticklabel cs:0.5),anchor=near ticklabel,
ylabel=$F$ [N],
ymin=-0.05,ymax=0.2,
ytick=-0.05,0,...,0.25,
ytick pos=left,
ytick align=outside,
]
addplot [only marks,mark=*,mark options=scale=0.5,red,fill=white] file LDPE_PETG_2.txt;

addplot [only marks,mark=*,mark options=scale=0.5,blue,fill=white] file LDPE-DOTO_PETG_2.txt;

endaxis
endtikzpicture
endfigure

enddocument









share|improve this question
















I use PGFPlots to create graphs and export them into my keynote slides. I always have to trim the sides of the exported pdf file. Attached is an example of such a graph.enter image description here I wonder if there is a way to automatically fit the plot into the whole page in the pdf file?



Here is the code that produces the graph



documentclass[a4paper]article

usepackageamsmath
usepackagexcolor
usepackagepgfplots
usepackagepgfplotstable%fitting functions
usepackagetikz
usetikzlibrarytikzmark,patterns,pgfplots.fillbetween

pagestyleempty

pgfkeys/pgf/number format/.cd,fixed

pgfplotssetcompat=1.15
pgfplotssetlabel style=font=LARGE,
tick label style=font=LARGE

pgfplotsseterror bars/.cd,
x dir=both, x explicit,
y dir=both, y explicit,


begindocument


beginfigure
centering
begintikzpicture
beginaxis[
enable tick line clipping=false, % makes all ticks same width
axis line style=semithick,
width=14cm,
height=7cm,
x tick style=black,semithick,
x label style=
at=(ticklabel cs:0.5),anchor=near ticklabel,
xlabel=$L$ [mm],
xmin=0,xmax=100,
xtick=0,20,...,100,
xtick pos=bottom,
xtick align=outside,
y tick style=black,semithick,
y label style=
at=(ticklabel cs:0.5),anchor=near ticklabel,
ylabel=$F$ [N],
ymin=-0.05,ymax=0.2,
ytick=-0.05,0,...,0.25,
ytick pos=left,
ytick align=outside,
]
addplot [only marks,mark=*,mark options=scale=0.5,red,fill=white] file LDPE_PETG_2.txt;

addplot [only marks,mark=*,mark options=scale=0.5,blue,fill=white] file LDPE-DOTO_PETG_2.txt;

endaxis
endtikzpicture
endfigure

enddocument






pgfplots






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 9 at 20:42









TeXnician

25.9k63491




25.9k63491










asked Mar 9 at 20:40









GagikGagik

705




705





bumped to the homepage by Community 47 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 47 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Did you try pgfplotssetwidth=textwidth,height=textheight? Or just replace width=14cm, height=7cm, by width=textwidth,height=textheight,

    – marmot
    Mar 9 at 21:08







  • 2





    If you are exporting the plots, why not use standalone class? Don't use figure, and if you need a caption use` captionoffigure...` (caption or capt-of packages).

    – John Kormylo
    Mar 10 at 0:04












  • Thank you @John Kormylo, documenstcalssstandalone does the job. Moreover, I can perfectly fit it to the page and still use the width=xcm and height=ycm to adjust the plot size.

    – Gagik
    Mar 11 at 1:10











  • Another alternative would be to use TikZ's external (tikz-external) library to export your plots.

    – Stefan Pinnow
    Mar 11 at 20:26


















  • Did you try pgfplotssetwidth=textwidth,height=textheight? Or just replace width=14cm, height=7cm, by width=textwidth,height=textheight,

    – marmot
    Mar 9 at 21:08







  • 2





    If you are exporting the plots, why not use standalone class? Don't use figure, and if you need a caption use` captionoffigure...` (caption or capt-of packages).

    – John Kormylo
    Mar 10 at 0:04












  • Thank you @John Kormylo, documenstcalssstandalone does the job. Moreover, I can perfectly fit it to the page and still use the width=xcm and height=ycm to adjust the plot size.

    – Gagik
    Mar 11 at 1:10











  • Another alternative would be to use TikZ's external (tikz-external) library to export your plots.

    – Stefan Pinnow
    Mar 11 at 20:26

















Did you try pgfplotssetwidth=textwidth,height=textheight? Or just replace width=14cm, height=7cm, by width=textwidth,height=textheight,

– marmot
Mar 9 at 21:08






Did you try pgfplotssetwidth=textwidth,height=textheight? Or just replace width=14cm, height=7cm, by width=textwidth,height=textheight,

– marmot
Mar 9 at 21:08





2




2





If you are exporting the plots, why not use standalone class? Don't use figure, and if you need a caption use` captionoffigure...` (caption or capt-of packages).

– John Kormylo
Mar 10 at 0:04






If you are exporting the plots, why not use standalone class? Don't use figure, and if you need a caption use` captionoffigure...` (caption or capt-of packages).

– John Kormylo
Mar 10 at 0:04














Thank you @John Kormylo, documenstcalssstandalone does the job. Moreover, I can perfectly fit it to the page and still use the width=xcm and height=ycm to adjust the plot size.

– Gagik
Mar 11 at 1:10





Thank you @John Kormylo, documenstcalssstandalone does the job. Moreover, I can perfectly fit it to the page and still use the width=xcm and height=ycm to adjust the plot size.

– Gagik
Mar 11 at 1:10













Another alternative would be to use TikZ's external (tikz-external) library to export your plots.

– Stefan Pinnow
Mar 11 at 20:26






Another alternative would be to use TikZ's external (tikz-external) library to export your plots.

– Stefan Pinnow
Mar 11 at 20:26











1 Answer
1






active

oldest

votes


















0














It's not exactly what you're looking for, but you could add this in the preamble.



usepackage[paperwidth=21cm,paperheight=10cm]geometry





share|improve this answer























    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',
    autoActivateHeartbeat: false,
    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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478636%2ffit-the-plot-to-the-entire-page-in-pgfplots%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    It's not exactly what you're looking for, but you could add this in the preamble.



    usepackage[paperwidth=21cm,paperheight=10cm]geometry





    share|improve this answer



























      0














      It's not exactly what you're looking for, but you could add this in the preamble.



      usepackage[paperwidth=21cm,paperheight=10cm]geometry





      share|improve this answer

























        0












        0








        0







        It's not exactly what you're looking for, but you could add this in the preamble.



        usepackage[paperwidth=21cm,paperheight=10cm]geometry





        share|improve this answer













        It's not exactly what you're looking for, but you could add this in the preamble.



        usepackage[paperwidth=21cm,paperheight=10cm]geometry






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 9 at 21:18









        jaspastjaspast

        1936




        1936



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478636%2ffit-the-plot-to-the-entire-page-in-pgfplots%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

            How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

            152 Atala Notae | Nexus externi | Tabula navigationis"Discovery Circumstances: Numbered Minor Planets"2000152Small-Body Database

            Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"