tikz: show 0 at the axis origin
How can I show the "0" value at the axis origin?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.11}
begin{document}
begin{tikzpicture}
begin{axis}[grid style=dashed,grid=both,ymin=0,ymax=70,xmax=0.35,xmin=0,
minor tick num=1,axis lines = middle,xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(axis description cs:1.1,0.03)},anchor=north},
y label style={at={(axis description cs:0,1.0)},anchor=south}, x tick label style={
/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
Thank you in advance
tikz-pgf
add a comment |
How can I show the "0" value at the axis origin?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.11}
begin{document}
begin{tikzpicture}
begin{axis}[grid style=dashed,grid=both,ymin=0,ymax=70,xmax=0.35,xmin=0,
minor tick num=1,axis lines = middle,xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(axis description cs:1.1,0.03)},anchor=north},
y label style={at={(axis description cs:0,1.0)},anchor=south}, x tick label style={
/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
Thank you in advance
tikz-pgf
add a comment |
How can I show the "0" value at the axis origin?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.11}
begin{document}
begin{tikzpicture}
begin{axis}[grid style=dashed,grid=both,ymin=0,ymax=70,xmax=0.35,xmin=0,
minor tick num=1,axis lines = middle,xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(axis description cs:1.1,0.03)},anchor=north},
y label style={at={(axis description cs:0,1.0)},anchor=south}, x tick label style={
/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
Thank you in advance
tikz-pgf
How can I show the "0" value at the axis origin?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.11}
begin{document}
begin{tikzpicture}
begin{axis}[grid style=dashed,grid=both,ymin=0,ymax=70,xmax=0.35,xmin=0,
minor tick num=1,axis lines = middle,xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(axis description cs:1.1,0.03)},anchor=north},
y label style={at={(axis description cs:0,1.0)},anchor=south}, x tick label style={
/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
Thank you in advance
tikz-pgf
tikz-pgf
asked Apr 6 at 18:16
user3204810user3204810
37517
37517
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
like this?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.16} % <--- i suggest you to upgrade pgfplots
begin{document}
begin{tikzpicture}
begin{axis}[
grid, grid style=dashed,
ymin=0,ymax=70,
extra y ticks={0}, % <---
xmax=0.35,xmin=0,
extra x ticks={0}, % <---
minor tick num=1,
axis lines = middle,
set layers, % <---
axis on top, % <---
xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(1,0)},right},
y label style={at={(0,1)},above},
x tick label style={/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
I've been trying for half an hour but I couldn't find the solution :-( +1
– Sebastiano
Apr 6 at 19:09
to be honest, i do not understand why is necessary this trick with extra ticks. thank you very much!
– Zarko
Apr 6 at 19:14
My sincere congratulation to the kindest OP called: Zarko.
– Sebastiano
Apr 6 at 19:19
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');
});
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%2f483563%2ftikz-show-0-at-the-axis-origin%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
like this?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.16} % <--- i suggest you to upgrade pgfplots
begin{document}
begin{tikzpicture}
begin{axis}[
grid, grid style=dashed,
ymin=0,ymax=70,
extra y ticks={0}, % <---
xmax=0.35,xmin=0,
extra x ticks={0}, % <---
minor tick num=1,
axis lines = middle,
set layers, % <---
axis on top, % <---
xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(1,0)},right},
y label style={at={(0,1)},above},
x tick label style={/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
I've been trying for half an hour but I couldn't find the solution :-( +1
– Sebastiano
Apr 6 at 19:09
to be honest, i do not understand why is necessary this trick with extra ticks. thank you very much!
– Zarko
Apr 6 at 19:14
My sincere congratulation to the kindest OP called: Zarko.
– Sebastiano
Apr 6 at 19:19
add a comment |
like this?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.16} % <--- i suggest you to upgrade pgfplots
begin{document}
begin{tikzpicture}
begin{axis}[
grid, grid style=dashed,
ymin=0,ymax=70,
extra y ticks={0}, % <---
xmax=0.35,xmin=0,
extra x ticks={0}, % <---
minor tick num=1,
axis lines = middle,
set layers, % <---
axis on top, % <---
xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(1,0)},right},
y label style={at={(0,1)},above},
x tick label style={/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
I've been trying for half an hour but I couldn't find the solution :-( +1
– Sebastiano
Apr 6 at 19:09
to be honest, i do not understand why is necessary this trick with extra ticks. thank you very much!
– Zarko
Apr 6 at 19:14
My sincere congratulation to the kindest OP called: Zarko.
– Sebastiano
Apr 6 at 19:19
add a comment |
like this?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.16} % <--- i suggest you to upgrade pgfplots
begin{document}
begin{tikzpicture}
begin{axis}[
grid, grid style=dashed,
ymin=0,ymax=70,
extra y ticks={0}, % <---
xmax=0.35,xmin=0,
extra x ticks={0}, % <---
minor tick num=1,
axis lines = middle,
set layers, % <---
axis on top, % <---
xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(1,0)},right},
y label style={at={(0,1)},above},
x tick label style={/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
like this?
documentclass[border=2mm]{standalone}
usepackage{amsmath}
usepackage{amssymb}
usepackage{pgfplots}
usepackage{siunitx}
pgfplotsset{compat=1.16} % <--- i suggest you to upgrade pgfplots
begin{document}
begin{tikzpicture}
begin{axis}[
grid, grid style=dashed,
ymin=0,ymax=70,
extra y ticks={0}, % <---
xmax=0.35,xmin=0,
extra x ticks={0}, % <---
minor tick num=1,
axis lines = middle,
set layers, % <---
axis on top, % <---
xlabel=$x_1$,ylabel=T;$(si{celsius})$,
x label style={at={(1,0)},right},
y label style={at={(0,1)},above},
x tick label style={/pgf/number format/.cd,
fixed relative,
},
]
addplot+[color=red,mark=*,mark options={draw=red,fill=green},smooth]
coordinates {
(0.05,31.9)(0.10,30.1)(0.20,35.8)(0.31,65.4)
};
end{axis}
end{tikzpicture}
end{document}
answered Apr 6 at 19:05
ZarkoZarko
130k869170
130k869170
I've been trying for half an hour but I couldn't find the solution :-( +1
– Sebastiano
Apr 6 at 19:09
to be honest, i do not understand why is necessary this trick with extra ticks. thank you very much!
– Zarko
Apr 6 at 19:14
My sincere congratulation to the kindest OP called: Zarko.
– Sebastiano
Apr 6 at 19:19
add a comment |
I've been trying for half an hour but I couldn't find the solution :-( +1
– Sebastiano
Apr 6 at 19:09
to be honest, i do not understand why is necessary this trick with extra ticks. thank you very much!
– Zarko
Apr 6 at 19:14
My sincere congratulation to the kindest OP called: Zarko.
– Sebastiano
Apr 6 at 19:19
I've been trying for half an hour but I couldn't find the solution :-( +1
– Sebastiano
Apr 6 at 19:09
I've been trying for half an hour but I couldn't find the solution :-( +1
– Sebastiano
Apr 6 at 19:09
to be honest, i do not understand why is necessary this trick with extra ticks. thank you very much!
– Zarko
Apr 6 at 19:14
to be honest, i do not understand why is necessary this trick with extra ticks. thank you very much!
– Zarko
Apr 6 at 19:14
My sincere congratulation to the kindest OP called: Zarko.
– Sebastiano
Apr 6 at 19:19
My sincere congratulation to the kindest OP called: Zarko.
– Sebastiano
Apr 6 at 19:19
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');
});
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%2f483563%2ftikz-show-0-at-the-axis-origin%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