tikz: show 0 at the axis origin












5















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}


Phase diagram of a partially miscible binary liquid system
Thank you in advance










share|improve this question



























    5















    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}


    Phase diagram of a partially miscible binary liquid system
    Thank you in advance










    share|improve this question

























      5












      5








      5








      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}


      Phase diagram of a partially miscible binary liquid system
      Thank you in advance










      share|improve this question














      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}


      Phase diagram of a partially miscible binary liquid system
      Thank you in advance







      tikz-pgf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 6 at 18:16









      user3204810user3204810

      37017




      37017






















          1 Answer
          1






          active

          oldest

          votes


















          5














          like this?



          enter image description here



          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}





          share|improve this answer
























          • 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












          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%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









          5














          like this?



          enter image description here



          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}





          share|improve this answer
























          • 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
















          5














          like this?



          enter image description here



          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}





          share|improve this answer
























          • 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














          5












          5








          5







          like this?



          enter image description here



          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}





          share|improve this answer













          like this?



          enter image description here



          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}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 6 at 19:05









          ZarkoZarko

          129k868169




          129k868169













          • 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











          • 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


















          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%2f483563%2ftikz-show-0-at-the-axis-origin%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

          Statuo de Libereco

          Tanganjiko

          Liste der Baudenkmäler in Enneberg