Why dont we use fraction for PSTricks's coordinates?












0















documentclass[tikz,border=5mm]{standalone}
begin{document}
begin{tikzpicture}
% Định nghĩa 2 hàm
deff(#1){4-#1*#1/3}
defg(#1){#1*#1/4}

% Tô màu miền giới hạn bởi 2 đồ thị trong [-1,2]
fill[blue!30]
plot[domain=-1:2] (x,{f(x)})--(2,{g(2)})--
plot[domain=2:-1] (x,{g(x)})--(-1,0)--cycle;

% Vẽ 2 trục tọa độ
draw[->] (-3,0)--(3.5,0) node[below]{$x$};
draw[->] (0,-.5)--(0,4.5) node[left]{$y$};
draw[dashed]
%(2,{f(2)})--(2,0) node[below]{$2$}
%(-1,{f(-1)})--(-1,0) node[below]{$-1$};
(2,8/3)--(2,0) node[below]{$2$} %% <<<---
(-1,11/3)--(-1,0) node[below]{$-1$}; %% <<<---
% Vẽ 2 đồ thị
draw plot[domain=-3:3] (x,{f(x)});
draw plot[domain=-3:3] (x,{g(x)});
end{tikzpicture}
end{document}


enter image description here



documentclass[border=5pt,pstricks,12pt]{standalone}
usepackage{pst-plot,pst-calculate}
begin{document}
begin{pspicture}[algebraic](-3.2,-1.2)(4.2,5)
pscustom[fillstyle=solid,fillcolor=blue!30,linestyle=none]{%
psplot{-1}{2}{(x^2)/4}
psplot{2}{-1}{4-(x^2)/3}
}
psaxes[labels=none,ticks=none]{->}(0,0)(-3,-1)(4,5)[$x$,-90][$y$,0]
psplot{-3}{3}{(x^2)/4}
psplot{-3}{3}{4-(x^2)/3}
psLineSegments[linestyle=dashed](-1,0)(-1,pscalculate{11/3})(2,0)(2,pscalculate{8/3}) %% <<<---
psxTick(-1){$-1$}
psxTick(2){$2$}
end{pspicture}
end{document}


enter image description here



Why dont we use fraction for PSTricks's coordinates ??










share|improve this question



























    0















    documentclass[tikz,border=5mm]{standalone}
    begin{document}
    begin{tikzpicture}
    % Định nghĩa 2 hàm
    deff(#1){4-#1*#1/3}
    defg(#1){#1*#1/4}

    % Tô màu miền giới hạn bởi 2 đồ thị trong [-1,2]
    fill[blue!30]
    plot[domain=-1:2] (x,{f(x)})--(2,{g(2)})--
    plot[domain=2:-1] (x,{g(x)})--(-1,0)--cycle;

    % Vẽ 2 trục tọa độ
    draw[->] (-3,0)--(3.5,0) node[below]{$x$};
    draw[->] (0,-.5)--(0,4.5) node[left]{$y$};
    draw[dashed]
    %(2,{f(2)})--(2,0) node[below]{$2$}
    %(-1,{f(-1)})--(-1,0) node[below]{$-1$};
    (2,8/3)--(2,0) node[below]{$2$} %% <<<---
    (-1,11/3)--(-1,0) node[below]{$-1$}; %% <<<---
    % Vẽ 2 đồ thị
    draw plot[domain=-3:3] (x,{f(x)});
    draw plot[domain=-3:3] (x,{g(x)});
    end{tikzpicture}
    end{document}


    enter image description here



    documentclass[border=5pt,pstricks,12pt]{standalone}
    usepackage{pst-plot,pst-calculate}
    begin{document}
    begin{pspicture}[algebraic](-3.2,-1.2)(4.2,5)
    pscustom[fillstyle=solid,fillcolor=blue!30,linestyle=none]{%
    psplot{-1}{2}{(x^2)/4}
    psplot{2}{-1}{4-(x^2)/3}
    }
    psaxes[labels=none,ticks=none]{->}(0,0)(-3,-1)(4,5)[$x$,-90][$y$,0]
    psplot{-3}{3}{(x^2)/4}
    psplot{-3}{3}{4-(x^2)/3}
    psLineSegments[linestyle=dashed](-1,0)(-1,pscalculate{11/3})(2,0)(2,pscalculate{8/3}) %% <<<---
    psxTick(-1){$-1$}
    psxTick(2){$2$}
    end{pspicture}
    end{document}


    enter image description here



    Why dont we use fraction for PSTricks's coordinates ??










    share|improve this question

























      0












      0








      0








      documentclass[tikz,border=5mm]{standalone}
      begin{document}
      begin{tikzpicture}
      % Định nghĩa 2 hàm
      deff(#1){4-#1*#1/3}
      defg(#1){#1*#1/4}

      % Tô màu miền giới hạn bởi 2 đồ thị trong [-1,2]
      fill[blue!30]
      plot[domain=-1:2] (x,{f(x)})--(2,{g(2)})--
      plot[domain=2:-1] (x,{g(x)})--(-1,0)--cycle;

      % Vẽ 2 trục tọa độ
      draw[->] (-3,0)--(3.5,0) node[below]{$x$};
      draw[->] (0,-.5)--(0,4.5) node[left]{$y$};
      draw[dashed]
      %(2,{f(2)})--(2,0) node[below]{$2$}
      %(-1,{f(-1)})--(-1,0) node[below]{$-1$};
      (2,8/3)--(2,0) node[below]{$2$} %% <<<---
      (-1,11/3)--(-1,0) node[below]{$-1$}; %% <<<---
      % Vẽ 2 đồ thị
      draw plot[domain=-3:3] (x,{f(x)});
      draw plot[domain=-3:3] (x,{g(x)});
      end{tikzpicture}
      end{document}


      enter image description here



      documentclass[border=5pt,pstricks,12pt]{standalone}
      usepackage{pst-plot,pst-calculate}
      begin{document}
      begin{pspicture}[algebraic](-3.2,-1.2)(4.2,5)
      pscustom[fillstyle=solid,fillcolor=blue!30,linestyle=none]{%
      psplot{-1}{2}{(x^2)/4}
      psplot{2}{-1}{4-(x^2)/3}
      }
      psaxes[labels=none,ticks=none]{->}(0,0)(-3,-1)(4,5)[$x$,-90][$y$,0]
      psplot{-3}{3}{(x^2)/4}
      psplot{-3}{3}{4-(x^2)/3}
      psLineSegments[linestyle=dashed](-1,0)(-1,pscalculate{11/3})(2,0)(2,pscalculate{8/3}) %% <<<---
      psxTick(-1){$-1$}
      psxTick(2){$2$}
      end{pspicture}
      end{document}


      enter image description here



      Why dont we use fraction for PSTricks's coordinates ??










      share|improve this question














      documentclass[tikz,border=5mm]{standalone}
      begin{document}
      begin{tikzpicture}
      % Định nghĩa 2 hàm
      deff(#1){4-#1*#1/3}
      defg(#1){#1*#1/4}

      % Tô màu miền giới hạn bởi 2 đồ thị trong [-1,2]
      fill[blue!30]
      plot[domain=-1:2] (x,{f(x)})--(2,{g(2)})--
      plot[domain=2:-1] (x,{g(x)})--(-1,0)--cycle;

      % Vẽ 2 trục tọa độ
      draw[->] (-3,0)--(3.5,0) node[below]{$x$};
      draw[->] (0,-.5)--(0,4.5) node[left]{$y$};
      draw[dashed]
      %(2,{f(2)})--(2,0) node[below]{$2$}
      %(-1,{f(-1)})--(-1,0) node[below]{$-1$};
      (2,8/3)--(2,0) node[below]{$2$} %% <<<---
      (-1,11/3)--(-1,0) node[below]{$-1$}; %% <<<---
      % Vẽ 2 đồ thị
      draw plot[domain=-3:3] (x,{f(x)});
      draw plot[domain=-3:3] (x,{g(x)});
      end{tikzpicture}
      end{document}


      enter image description here



      documentclass[border=5pt,pstricks,12pt]{standalone}
      usepackage{pst-plot,pst-calculate}
      begin{document}
      begin{pspicture}[algebraic](-3.2,-1.2)(4.2,5)
      pscustom[fillstyle=solid,fillcolor=blue!30,linestyle=none]{%
      psplot{-1}{2}{(x^2)/4}
      psplot{2}{-1}{4-(x^2)/3}
      }
      psaxes[labels=none,ticks=none]{->}(0,0)(-3,-1)(4,5)[$x$,-90][$y$,0]
      psplot{-3}{3}{(x^2)/4}
      psplot{-3}{3}{4-(x^2)/3}
      psLineSegments[linestyle=dashed](-1,0)(-1,pscalculate{11/3})(2,0)(2,pscalculate{8/3}) %% <<<---
      psxTick(-1){$-1$}
      psxTick(2){$2$}
      end{pspicture}
      end{document}


      enter image description here



      Why dont we use fraction for PSTricks's coordinates ??







      tikz-pgf pstricks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 25 mins ago









      chishimotojichishimotoji

      750319




      750319






















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


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472492%2fwhy-dont-we-use-fraction-for-pstrickss-coordinates%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
















          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%2f472492%2fwhy-dont-we-use-fraction-for-pstrickss-coordinates%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