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
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. 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
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.
add a comment |
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. 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
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 trypgfplotssetwidth=textwidth,height=textheight
? Or just replacewidth=14cm, height=7cm,
bywidth=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 thewidth=xcm
andheight=ycm
to adjust the plot size.
– Gagik
Mar 11 at 1:10
Another alternative would be to use TikZ'sexternal
(tikz-external) library to export your plots.
– Stefan Pinnow
Mar 11 at 20:26
add a comment |
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. 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
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. 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
pgfplots
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 trypgfplotssetwidth=textwidth,height=textheight
? Or just replacewidth=14cm, height=7cm,
bywidth=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 thewidth=xcm
andheight=ycm
to adjust the plot size.
– Gagik
Mar 11 at 1:10
Another alternative would be to use TikZ'sexternal
(tikz-external) library to export your plots.
– Stefan Pinnow
Mar 11 at 20:26
add a comment |
Did you trypgfplotssetwidth=textwidth,height=textheight
? Or just replacewidth=14cm, height=7cm,
bywidth=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 thewidth=xcm
andheight=ycm
to adjust the plot size.
– Gagik
Mar 11 at 1:10
Another alternative would be to use TikZ'sexternal
(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
add a comment |
1 Answer
1
active
oldest
votes
It's not exactly what you're looking for, but you could add this in the preamble.
usepackage[paperwidth=21cm,paperheight=10cm]geometry
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%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
It's not exactly what you're looking for, but you could add this in the preamble.
usepackage[paperwidth=21cm,paperheight=10cm]geometry
add a comment |
It's not exactly what you're looking for, but you could add this in the preamble.
usepackage[paperwidth=21cm,paperheight=10cm]geometry
add a comment |
It's not exactly what you're looking for, but you could add this in the preamble.
usepackage[paperwidth=21cm,paperheight=10cm]geometry
It's not exactly what you're looking for, but you could add this in the preamble.
usepackage[paperwidth=21cm,paperheight=10cm]geometry
answered Mar 9 at 21:18
jaspastjaspast
1936
1936
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2f478636%2ffit-the-plot-to-the-entire-page-in-pgfplots%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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
Did you try
pgfplotssetwidth=textwidth,height=textheight
? Or just replacewidth=14cm, height=7cm,
bywidth=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 thewidth=xcm
andheight=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