why do the first and last ticks of my pgfplot graph have different width?












0















I have noticed that when I choose the tick marks of my graph to be outside, the first and the last ticks are thinner. Anybody know how to fix that? Here is the code I used. Below is the screenshot of the graph produced.



enter image description here



documentclass{article}

usepackage[T1]{fontenc}
usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage[sc]{mathpazo}
usepackage{amsmath,amssymb,amsfonts,mathrsfs}
usepackage[amsmath,thmmarks]{ntheorem}
usepackage{graphicx}
usepackage{multirow}
usepackage{geometry}
usepackage{booktabs,makecell,longtable}
usepackage{lipsum}
usepackage{pdfpages}
usepackage{balance}
usepackage{lastpage}
usepackage{amsmath,bm}
usepackage{textcomp}
usepackage{subeqnarray}
usepackage{float}
usepackage{mathtools}
usepackage{cite}
usepackage[export]{adjustbox}
usepackage{etoolbox}
usepackage{enumitem}
usepackage{lmodern}
usepackage[labelfont=bf,font=sf,labelsep=space]{caption}
usepackage{mathpazo}
usepackage[nottoc,notlot,notlof]{tocbibind}
usepackage{pgfplots}
usepackage{hyperref}
usepackage{tikz}
usetikzlibrary{tikzmark}

pgfkeys{/pgf/number format/.cd,1000 sep={}}


newcommand{myfont}{fontfamily{cmss}selectfont}% used with mathpazo

DeclareMathOperator{Tr}{Tr}

setcounter{tocdepth}{2}

pgfplotsset{compat=1.5.1}
pgfplotsset{label style={font=Large},
tick label style={font=Large}}

pgfplotsset{error bars/.cd,
x dir=both, x explicit,
y dir=both, y explicit,
}
pgfplotsset{/pgfplots/error bars/error bar style={semithick,black}}
%pgfplotsset{/pgfplots/label shift={0pt}}


begin{document}


begin{figure}
centering

begin{tikzpicture}
begin{axis}[
axis line style=semithick,
width=9cm,
height=7cm,
only marks,
%mark size=3pt,
%legend image post style={mark options={scale=1.3,fill=white,line width=0.8pt}},
legend style={at={(0.95,0.3)},draw=none},
legend cell align={right},
x tick style={black,semithick},
x label/.style=
{at={(ticklabel cs:0.5)},anchor=near ticklabel},
xlabel={{$epsilon_n$} [{myfont -}]},
xmin=0,xmax=1,
xtick={0,0.5,...,1},
xtick pos=bottom,
%minor x tick num=1,
xtick align=outside,
%xminorgrids=true,
every y tick/.style={black,semithick},
y label style=
{at={(ticklabel cs:0.5)},anchor=near ticklabel},
ylabel={{$sigma_n$} [{myfont MPa}]},
ymin=0,ymax=150,
ytick={0,50,...,150},
ytick pos=left,
%minor y tick num=1,
ytick align=outside,
%yminorgrids=true,
]
addplot [sharp plot,red,very thick,mark=*,mark options={scale=2,blue,fill=white}]
coordinates{
(0.2,40)
(0.4,70)
(0.6,100)
(0.8,130)
};

end{axis}
end{tikzpicture}
end{figure}


end{document}









share|improve this question









New contributor




Gagik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Thank you very much JouleV for correcting my text.

    – Gagik
    3 mins ago
















0















I have noticed that when I choose the tick marks of my graph to be outside, the first and the last ticks are thinner. Anybody know how to fix that? Here is the code I used. Below is the screenshot of the graph produced.



enter image description here



documentclass{article}

usepackage[T1]{fontenc}
usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage[sc]{mathpazo}
usepackage{amsmath,amssymb,amsfonts,mathrsfs}
usepackage[amsmath,thmmarks]{ntheorem}
usepackage{graphicx}
usepackage{multirow}
usepackage{geometry}
usepackage{booktabs,makecell,longtable}
usepackage{lipsum}
usepackage{pdfpages}
usepackage{balance}
usepackage{lastpage}
usepackage{amsmath,bm}
usepackage{textcomp}
usepackage{subeqnarray}
usepackage{float}
usepackage{mathtools}
usepackage{cite}
usepackage[export]{adjustbox}
usepackage{etoolbox}
usepackage{enumitem}
usepackage{lmodern}
usepackage[labelfont=bf,font=sf,labelsep=space]{caption}
usepackage{mathpazo}
usepackage[nottoc,notlot,notlof]{tocbibind}
usepackage{pgfplots}
usepackage{hyperref}
usepackage{tikz}
usetikzlibrary{tikzmark}

pgfkeys{/pgf/number format/.cd,1000 sep={}}


newcommand{myfont}{fontfamily{cmss}selectfont}% used with mathpazo

DeclareMathOperator{Tr}{Tr}

setcounter{tocdepth}{2}

pgfplotsset{compat=1.5.1}
pgfplotsset{label style={font=Large},
tick label style={font=Large}}

pgfplotsset{error bars/.cd,
x dir=both, x explicit,
y dir=both, y explicit,
}
pgfplotsset{/pgfplots/error bars/error bar style={semithick,black}}
%pgfplotsset{/pgfplots/label shift={0pt}}


begin{document}


begin{figure}
centering

begin{tikzpicture}
begin{axis}[
axis line style=semithick,
width=9cm,
height=7cm,
only marks,
%mark size=3pt,
%legend image post style={mark options={scale=1.3,fill=white,line width=0.8pt}},
legend style={at={(0.95,0.3)},draw=none},
legend cell align={right},
x tick style={black,semithick},
x label/.style=
{at={(ticklabel cs:0.5)},anchor=near ticklabel},
xlabel={{$epsilon_n$} [{myfont -}]},
xmin=0,xmax=1,
xtick={0,0.5,...,1},
xtick pos=bottom,
%minor x tick num=1,
xtick align=outside,
%xminorgrids=true,
every y tick/.style={black,semithick},
y label style=
{at={(ticklabel cs:0.5)},anchor=near ticklabel},
ylabel={{$sigma_n$} [{myfont MPa}]},
ymin=0,ymax=150,
ytick={0,50,...,150},
ytick pos=left,
%minor y tick num=1,
ytick align=outside,
%yminorgrids=true,
]
addplot [sharp plot,red,very thick,mark=*,mark options={scale=2,blue,fill=white}]
coordinates{
(0.2,40)
(0.4,70)
(0.6,100)
(0.8,130)
};

end{axis}
end{tikzpicture}
end{figure}


end{document}









share|improve this question









New contributor




Gagik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Thank you very much JouleV for correcting my text.

    – Gagik
    3 mins ago














0












0








0








I have noticed that when I choose the tick marks of my graph to be outside, the first and the last ticks are thinner. Anybody know how to fix that? Here is the code I used. Below is the screenshot of the graph produced.



enter image description here



documentclass{article}

usepackage[T1]{fontenc}
usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage[sc]{mathpazo}
usepackage{amsmath,amssymb,amsfonts,mathrsfs}
usepackage[amsmath,thmmarks]{ntheorem}
usepackage{graphicx}
usepackage{multirow}
usepackage{geometry}
usepackage{booktabs,makecell,longtable}
usepackage{lipsum}
usepackage{pdfpages}
usepackage{balance}
usepackage{lastpage}
usepackage{amsmath,bm}
usepackage{textcomp}
usepackage{subeqnarray}
usepackage{float}
usepackage{mathtools}
usepackage{cite}
usepackage[export]{adjustbox}
usepackage{etoolbox}
usepackage{enumitem}
usepackage{lmodern}
usepackage[labelfont=bf,font=sf,labelsep=space]{caption}
usepackage{mathpazo}
usepackage[nottoc,notlot,notlof]{tocbibind}
usepackage{pgfplots}
usepackage{hyperref}
usepackage{tikz}
usetikzlibrary{tikzmark}

pgfkeys{/pgf/number format/.cd,1000 sep={}}


newcommand{myfont}{fontfamily{cmss}selectfont}% used with mathpazo

DeclareMathOperator{Tr}{Tr}

setcounter{tocdepth}{2}

pgfplotsset{compat=1.5.1}
pgfplotsset{label style={font=Large},
tick label style={font=Large}}

pgfplotsset{error bars/.cd,
x dir=both, x explicit,
y dir=both, y explicit,
}
pgfplotsset{/pgfplots/error bars/error bar style={semithick,black}}
%pgfplotsset{/pgfplots/label shift={0pt}}


begin{document}


begin{figure}
centering

begin{tikzpicture}
begin{axis}[
axis line style=semithick,
width=9cm,
height=7cm,
only marks,
%mark size=3pt,
%legend image post style={mark options={scale=1.3,fill=white,line width=0.8pt}},
legend style={at={(0.95,0.3)},draw=none},
legend cell align={right},
x tick style={black,semithick},
x label/.style=
{at={(ticklabel cs:0.5)},anchor=near ticklabel},
xlabel={{$epsilon_n$} [{myfont -}]},
xmin=0,xmax=1,
xtick={0,0.5,...,1},
xtick pos=bottom,
%minor x tick num=1,
xtick align=outside,
%xminorgrids=true,
every y tick/.style={black,semithick},
y label style=
{at={(ticklabel cs:0.5)},anchor=near ticklabel},
ylabel={{$sigma_n$} [{myfont MPa}]},
ymin=0,ymax=150,
ytick={0,50,...,150},
ytick pos=left,
%minor y tick num=1,
ytick align=outside,
%yminorgrids=true,
]
addplot [sharp plot,red,very thick,mark=*,mark options={scale=2,blue,fill=white}]
coordinates{
(0.2,40)
(0.4,70)
(0.6,100)
(0.8,130)
};

end{axis}
end{tikzpicture}
end{figure}


end{document}









share|improve this question









New contributor




Gagik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have noticed that when I choose the tick marks of my graph to be outside, the first and the last ticks are thinner. Anybody know how to fix that? Here is the code I used. Below is the screenshot of the graph produced.



enter image description here



documentclass{article}

usepackage[T1]{fontenc}
usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage[sc]{mathpazo}
usepackage{amsmath,amssymb,amsfonts,mathrsfs}
usepackage[amsmath,thmmarks]{ntheorem}
usepackage{graphicx}
usepackage{multirow}
usepackage{geometry}
usepackage{booktabs,makecell,longtable}
usepackage{lipsum}
usepackage{pdfpages}
usepackage{balance}
usepackage{lastpage}
usepackage{amsmath,bm}
usepackage{textcomp}
usepackage{subeqnarray}
usepackage{float}
usepackage{mathtools}
usepackage{cite}
usepackage[export]{adjustbox}
usepackage{etoolbox}
usepackage{enumitem}
usepackage{lmodern}
usepackage[labelfont=bf,font=sf,labelsep=space]{caption}
usepackage{mathpazo}
usepackage[nottoc,notlot,notlof]{tocbibind}
usepackage{pgfplots}
usepackage{hyperref}
usepackage{tikz}
usetikzlibrary{tikzmark}

pgfkeys{/pgf/number format/.cd,1000 sep={}}


newcommand{myfont}{fontfamily{cmss}selectfont}% used with mathpazo

DeclareMathOperator{Tr}{Tr}

setcounter{tocdepth}{2}

pgfplotsset{compat=1.5.1}
pgfplotsset{label style={font=Large},
tick label style={font=Large}}

pgfplotsset{error bars/.cd,
x dir=both, x explicit,
y dir=both, y explicit,
}
pgfplotsset{/pgfplots/error bars/error bar style={semithick,black}}
%pgfplotsset{/pgfplots/label shift={0pt}}


begin{document}


begin{figure}
centering

begin{tikzpicture}
begin{axis}[
axis line style=semithick,
width=9cm,
height=7cm,
only marks,
%mark size=3pt,
%legend image post style={mark options={scale=1.3,fill=white,line width=0.8pt}},
legend style={at={(0.95,0.3)},draw=none},
legend cell align={right},
x tick style={black,semithick},
x label/.style=
{at={(ticklabel cs:0.5)},anchor=near ticklabel},
xlabel={{$epsilon_n$} [{myfont -}]},
xmin=0,xmax=1,
xtick={0,0.5,...,1},
xtick pos=bottom,
%minor x tick num=1,
xtick align=outside,
%xminorgrids=true,
every y tick/.style={black,semithick},
y label style=
{at={(ticklabel cs:0.5)},anchor=near ticklabel},
ylabel={{$sigma_n$} [{myfont MPa}]},
ymin=0,ymax=150,
ytick={0,50,...,150},
ytick pos=left,
%minor y tick num=1,
ytick align=outside,
%yminorgrids=true,
]
addplot [sharp plot,red,very thick,mark=*,mark options={scale=2,blue,fill=white}]
coordinates{
(0.2,40)
(0.4,70)
(0.6,100)
(0.8,130)
};

end{axis}
end{tikzpicture}
end{figure}


end{document}






pgfplots ticks






share|improve this question









New contributor




Gagik 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




Gagik 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 11 mins ago









JouleV

2,464628




2,464628






New contributor




Gagik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 12 mins ago









GagikGagik

11




11




New contributor




Gagik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Gagik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Gagik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Thank you very much JouleV for correcting my text.

    – Gagik
    3 mins ago



















  • Thank you very much JouleV for correcting my text.

    – Gagik
    3 mins ago

















Thank you very much JouleV for correcting my text.

– Gagik
3 mins ago





Thank you very much JouleV for correcting my text.

– Gagik
3 mins ago










0






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',
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
});


}
});






Gagik 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%2f472051%2fwhy-do-the-first-and-last-ticks-of-my-pgfplot-graph-have-different-width%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








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










draft saved

draft discarded


















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













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












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
















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%2f472051%2fwhy-do-the-first-and-last-ticks-of-my-pgfplot-graph-have-different-width%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

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt