I'm trying to graph a rational functionplotting two time series with boundsGrouped bar chartHow to define the default vertical distance between nodes?How do i get the x axis on top but keep a line on the bottomHow 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

Where does the tea come from?

Rule of thumb: how far before changing my chain to prevent cassette wear

How can a "proper" function have a vertical slope?

Novel set in the future, children cannot change the class they are born into, one class is made uneducated by associating books with pain

Paper status "Accept with Shepherd". What does it really mean?

Why does b+=(4,) work and b = b + (4,) doesn't work when b is a list?

33 Months on Death Row

Using Terminal` (ASCII plots) in Wolfram 12

Did smallpox emerge in 1580?

How much do sea levels rise due to thermal expansion?

Pass a bash variable to python script

How many integers are there that are not divisible by any prime larger than 20 and not divisible by the square of any prime?

Why are KDFs slow? Is using a KDF more secure than using the original secret?

What do you call a document which has no content?

Can you take an Immortal Phoenix out of the game?

Why does 1.1.1.1 not resolve archive.is?

What is it called when you use wrong but smart arguments?

What happens if a geocentric model of the world were correct?

How to get the SMILES of all compounds on PubChem?

What is the fastest algorithm for finding the natural logarithm of a big number?

SuperTuxKart 0.9.3-2 has no online multiplayer?

How should I tell a professor the answer to something he doesn't know?

They say I should work on bigger things

How to give a rationality-inducing drug to an entire software company?



I'm trying to graph a rational function


plotting two time series with boundsGrouped bar chartHow to define the default vertical distance between nodes?How do i get the x axis on top but keep a line on the bottomHow 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






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









3

















The function I am trying to plot is y = frac6x^2-3x+42x^2-8



documentclassarticle
usepackage[utf8]inputenc
usepackagetitling
usepackageamssymb
usepackagepgfplots

begintikzpicture
beginaxis
[
title = Graph of $frac6x^2-3x+42x^2-8$,
axis lines = center,
xlabel = $x$,
ylabel = $y$,
]
addplot[color=red]y = frac6x^2-3x+42x^2-8;
endaxis
endtikzpicture


I am new to LaTex and I've been trying to follow other answers on here, but I'm still a bit confused. Apologies for posting a duplicate.



Edit: Sorry if I wasn't clear, here is how it's supposed to look.










share|improve this question









New contributor



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


















  • 1





    Hello and welcome! Try replacing y=frac6x^2-3x+42x^2-8 with (6*x^2-3*x+4)(2*x^2-8) as a starting point

    – cmhughes
    9 hours ago











  • In addition, use unbounded coords=jump, to make the plot jump at the poles.

    – Schrödinger's cat
    9 hours ago

















3

















The function I am trying to plot is y = frac6x^2-3x+42x^2-8



documentclassarticle
usepackage[utf8]inputenc
usepackagetitling
usepackageamssymb
usepackagepgfplots

begintikzpicture
beginaxis
[
title = Graph of $frac6x^2-3x+42x^2-8$,
axis lines = center,
xlabel = $x$,
ylabel = $y$,
]
addplot[color=red]y = frac6x^2-3x+42x^2-8;
endaxis
endtikzpicture


I am new to LaTex and I've been trying to follow other answers on here, but I'm still a bit confused. Apologies for posting a duplicate.



Edit: Sorry if I wasn't clear, here is how it's supposed to look.










share|improve this question









New contributor



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


















  • 1





    Hello and welcome! Try replacing y=frac6x^2-3x+42x^2-8 with (6*x^2-3*x+4)(2*x^2-8) as a starting point

    – cmhughes
    9 hours ago











  • In addition, use unbounded coords=jump, to make the plot jump at the poles.

    – Schrödinger's cat
    9 hours ago













3












3








3








The function I am trying to plot is y = frac6x^2-3x+42x^2-8



documentclassarticle
usepackage[utf8]inputenc
usepackagetitling
usepackageamssymb
usepackagepgfplots

begintikzpicture
beginaxis
[
title = Graph of $frac6x^2-3x+42x^2-8$,
axis lines = center,
xlabel = $x$,
ylabel = $y$,
]
addplot[color=red]y = frac6x^2-3x+42x^2-8;
endaxis
endtikzpicture


I am new to LaTex and I've been trying to follow other answers on here, but I'm still a bit confused. Apologies for posting a duplicate.



Edit: Sorry if I wasn't clear, here is how it's supposed to look.










share|improve this question









New contributor



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











The function I am trying to plot is y = frac6x^2-3x+42x^2-8



documentclassarticle
usepackage[utf8]inputenc
usepackagetitling
usepackageamssymb
usepackagepgfplots

begintikzpicture
beginaxis
[
title = Graph of $frac6x^2-3x+42x^2-8$,
axis lines = center,
xlabel = $x$,
ylabel = $y$,
]
addplot[color=red]y = frac6x^2-3x+42x^2-8;
endaxis
endtikzpicture


I am new to LaTex and I've been trying to follow other answers on here, but I'm still a bit confused. Apologies for posting a duplicate.



Edit: Sorry if I wasn't clear, here is how it's supposed to look.







tikz-pgf pgfplots graphs






share|improve this question









New contributor



maxgonz 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



maxgonz 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



share|improve this question








edited 9 hours ago







maxgonz













New contributor



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








asked 10 hours ago









maxgonzmaxgonz

184 bronze badges




184 bronze badges




New contributor



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




New contributor




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












  • 1





    Hello and welcome! Try replacing y=frac6x^2-3x+42x^2-8 with (6*x^2-3*x+4)(2*x^2-8) as a starting point

    – cmhughes
    9 hours ago











  • In addition, use unbounded coords=jump, to make the plot jump at the poles.

    – Schrödinger's cat
    9 hours ago












  • 1





    Hello and welcome! Try replacing y=frac6x^2-3x+42x^2-8 with (6*x^2-3*x+4)(2*x^2-8) as a starting point

    – cmhughes
    9 hours ago











  • In addition, use unbounded coords=jump, to make the plot jump at the poles.

    – Schrödinger's cat
    9 hours ago







1




1





Hello and welcome! Try replacing y=frac6x^2-3x+42x^2-8 with (6*x^2-3*x+4)(2*x^2-8) as a starting point

– cmhughes
9 hours ago





Hello and welcome! Try replacing y=frac6x^2-3x+42x^2-8 with (6*x^2-3*x+4)(2*x^2-8) as a starting point

– cmhughes
9 hours ago













In addition, use unbounded coords=jump, to make the plot jump at the poles.

– Schrödinger's cat
9 hours ago





In addition, use unbounded coords=jump, to make the plot jump at the poles.

– Schrödinger's cat
9 hours ago










3 Answers
3






active

oldest

votes


















5


















You can try the following, if you want a smoother plot, just increase the number of points.



documentclassarticle
usepackagepgfplots
pgfplotssetcompat=1.16

begindocument

begintikzpicture
beginaxis
[
title = Graph of $frac6x^2-3x+42x^2-8$,
axis lines = center,
xlabel = $x$,
ylabel = $y$,
]
addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
endaxis
endtikzpicture

enddocument



enter image description here




Edit:



As I said, you can increase no. points by samples=<..> and also you can limit ymin and ymax because you have two infinite discontinuities at ±2:



begintikzpicture
beginaxis
[
title = Graph of $frac6x^2-3x+42x^2-8$,
axis lines = center,
xlabel = $x$,
ylabel = $y$,
samples=500,
ymin=-150, ymax=150,
]
addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
endaxis
endtikzpicture



enter image description here







share|improve this answer




























  • That's not how the graph should look. Here is how it should look, sorry if I wasn't clear! link to the graph

    – maxgonz
    9 hours ago












  • That is exactly how the graph in the provided link looks like, besides that it isn't really smooth, because by default "only" 25 sample points are used. That is why AboAmmar suggested to increase samples to a higher number.

    – Stefan Pinnow
    9 hours ago











  • @StefanPinnow Oh sorry, thank you!

    – maxgonz
    9 hours ago


















1


















with plain TikZ:



enter image description here



documentclass[tikz,border=5mm]standalone
begindocument
begintikzpicture[yscale=1/30,xscale=1.2,
declare function=
f(x)=(6*x*x-3*x+4)/(2*x*x-8);
]
defxmin-4 defxmax4
defymin-100 defymax100

draw[->] (xmin,0)--(xmax,0) node[below]$x$;
draw[->] (0,ymin)--(0,ymax) node[right]$y$;
draw (2,ymax)--(2,ymin) (-2,ymax)--(-2,ymin);
draw[magenta,smooth,samples=100]
plot[domain=-1.95:1.97] (x,f(x))
plot[domain=2.03:3.8] (x,f(x))
plot[domain=-3.8:-2.05] (x,f(x));
draw
(0,50)--+(0:1mm)--+(180:1mm) node[left]$50$
(0,-50)--+(0:1mm)--+(180:1mm) node[left]$-50$;
path
(0,0) node[below left]O
(2,0) node[below right]$2$
(-2,0) node[below left]$-2$
(current bounding box.north) node[above]
The graph of $y=frac6x^2-3x+42x^2-8$;
endtikzpicture
enddocument





share|improve this answer

































    1


















    Hasty attempt with MetaPost and LuaLaTeX, using an old template of my own.



    documentclass[12pt,border=5mm]standalone
    usepackageluatex85, luamplib
    mplibsetformatmetafun
    mplibtextextlabelenable
    mplibnumbersystemdouble
    begindocument
    beginmplibcode

    vardef function(expr xmin, xmax, xstep)(text f_x) =
    save x; x := xmin;
    (x, f_x)
    forever: hide(x := x + xstep) exitif x > xmax;
    .. (x, f_x)
    endfor
    if x - xstep < xmax: hide(x := xmax) .. (x, f_x) fi
    enddef;

    u = v = .5cm;
    xmax = -xmin = 15; ymax = -ymin = 20; xstep := .01;

    vardef f(expr x) = (6(x**2)-3x+4)/(2(x**2)-8) enddef;

    beginfig(1);

    drawoptions(withcolor green);
    draw (-2u, ymin*v) -- (-2u, ymax*v);
    draw (2u, ymin*v) -- (2u, ymax*v);
    draw (xmin*u, 3v) -- (xmax*u, 3v);

    drawoptions(withcolor red);
    draw function(xmin, -2.1, .xstep)(f(x)) xyscaled (u,v);
    draw function(-1.9, 1.95, xstep)(f(x)) xyscaled (u,v);
    draw function(2.1, xmax, xstep)(f(x)) xyscaled (u,v);

    clip currentpicture to ((xmin, ymin) -- (xmax, ymin) -- (xmax, ymax) -- (xmin, ymax) -- cycle) xyscaled (u,v);

    drawoptions(withcolor black);
    drawarrow (xmin*u, 0) -- (xmax*u, 0);
    drawarrow (0, ymin*v) -- (0, ymax*v);

    for i = 1 upto floor(xmax.-1):
    draw (i*u, -2bp) -- (i*u, 2bp);
    draw (-i*u, -2bp) -- (-i*u, 2bp);
    endfor;

    for j = 1 upto floor(ymax-.1):
    draw (2bp, j*v) -- (-2bp, j*v);
    draw (2bp, -j*v) -- (-2bp, -j*v);
    endfor;

    label.bot("$x$", (xmax*u,0)); label.lft("$y$", (0, ymax*v));
    labeloffset := 5bp;
    label.bot("$-2$", (-2u,0)); label.bot("$2$", (2u, 0));
    label.lft("$3$", (0,3v));
    endfig;

    endmplibcode
    enddocument


    enter image description here






    share|improve this answer





























      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/4.0/"u003ecc by-sa 4.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
      );



      );







      maxgonz 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%2f511206%2fim-trying-to-graph-a-rational-function%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown


























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      5


















      You can try the following, if you want a smoother plot, just increase the number of points.



      documentclassarticle
      usepackagepgfplots
      pgfplotssetcompat=1.16

      begindocument

      begintikzpicture
      beginaxis
      [
      title = Graph of $frac6x^2-3x+42x^2-8$,
      axis lines = center,
      xlabel = $x$,
      ylabel = $y$,
      ]
      addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
      endaxis
      endtikzpicture

      enddocument



      enter image description here




      Edit:



      As I said, you can increase no. points by samples=<..> and also you can limit ymin and ymax because you have two infinite discontinuities at ±2:



      begintikzpicture
      beginaxis
      [
      title = Graph of $frac6x^2-3x+42x^2-8$,
      axis lines = center,
      xlabel = $x$,
      ylabel = $y$,
      samples=500,
      ymin=-150, ymax=150,
      ]
      addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
      endaxis
      endtikzpicture



      enter image description here







      share|improve this answer




























      • That's not how the graph should look. Here is how it should look, sorry if I wasn't clear! link to the graph

        – maxgonz
        9 hours ago












      • That is exactly how the graph in the provided link looks like, besides that it isn't really smooth, because by default "only" 25 sample points are used. That is why AboAmmar suggested to increase samples to a higher number.

        – Stefan Pinnow
        9 hours ago











      • @StefanPinnow Oh sorry, thank you!

        – maxgonz
        9 hours ago















      5


















      You can try the following, if you want a smoother plot, just increase the number of points.



      documentclassarticle
      usepackagepgfplots
      pgfplotssetcompat=1.16

      begindocument

      begintikzpicture
      beginaxis
      [
      title = Graph of $frac6x^2-3x+42x^2-8$,
      axis lines = center,
      xlabel = $x$,
      ylabel = $y$,
      ]
      addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
      endaxis
      endtikzpicture

      enddocument



      enter image description here




      Edit:



      As I said, you can increase no. points by samples=<..> and also you can limit ymin and ymax because you have two infinite discontinuities at ±2:



      begintikzpicture
      beginaxis
      [
      title = Graph of $frac6x^2-3x+42x^2-8$,
      axis lines = center,
      xlabel = $x$,
      ylabel = $y$,
      samples=500,
      ymin=-150, ymax=150,
      ]
      addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
      endaxis
      endtikzpicture



      enter image description here







      share|improve this answer




























      • That's not how the graph should look. Here is how it should look, sorry if I wasn't clear! link to the graph

        – maxgonz
        9 hours ago












      • That is exactly how the graph in the provided link looks like, besides that it isn't really smooth, because by default "only" 25 sample points are used. That is why AboAmmar suggested to increase samples to a higher number.

        – Stefan Pinnow
        9 hours ago











      • @StefanPinnow Oh sorry, thank you!

        – maxgonz
        9 hours ago













      5














      5










      5









      You can try the following, if you want a smoother plot, just increase the number of points.



      documentclassarticle
      usepackagepgfplots
      pgfplotssetcompat=1.16

      begindocument

      begintikzpicture
      beginaxis
      [
      title = Graph of $frac6x^2-3x+42x^2-8$,
      axis lines = center,
      xlabel = $x$,
      ylabel = $y$,
      ]
      addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
      endaxis
      endtikzpicture

      enddocument



      enter image description here




      Edit:



      As I said, you can increase no. points by samples=<..> and also you can limit ymin and ymax because you have two infinite discontinuities at ±2:



      begintikzpicture
      beginaxis
      [
      title = Graph of $frac6x^2-3x+42x^2-8$,
      axis lines = center,
      xlabel = $x$,
      ylabel = $y$,
      samples=500,
      ymin=-150, ymax=150,
      ]
      addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
      endaxis
      endtikzpicture



      enter image description here







      share|improve this answer
















      You can try the following, if you want a smoother plot, just increase the number of points.



      documentclassarticle
      usepackagepgfplots
      pgfplotssetcompat=1.16

      begindocument

      begintikzpicture
      beginaxis
      [
      title = Graph of $frac6x^2-3x+42x^2-8$,
      axis lines = center,
      xlabel = $x$,
      ylabel = $y$,
      ]
      addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
      endaxis
      endtikzpicture

      enddocument



      enter image description here




      Edit:



      As I said, you can increase no. points by samples=<..> and also you can limit ymin and ymax because you have two infinite discontinuities at ±2:



      begintikzpicture
      beginaxis
      [
      title = Graph of $frac6x^2-3x+42x^2-8$,
      axis lines = center,
      xlabel = $x$,
      ylabel = $y$,
      samples=500,
      ymin=-150, ymax=150,
      ]
      addplot[color=red] (6*x^2-3*x+4) / (2*x^2-8) ;
      endaxis
      endtikzpicture



      enter image description here








      share|improve this answer















      share|improve this answer




      share|improve this answer



      share|improve this answer








      edited 9 hours ago

























      answered 9 hours ago









      AboAmmarAboAmmar

      37k3 gold badges31 silver badges91 bronze badges




      37k3 gold badges31 silver badges91 bronze badges















      • That's not how the graph should look. Here is how it should look, sorry if I wasn't clear! link to the graph

        – maxgonz
        9 hours ago












      • That is exactly how the graph in the provided link looks like, besides that it isn't really smooth, because by default "only" 25 sample points are used. That is why AboAmmar suggested to increase samples to a higher number.

        – Stefan Pinnow
        9 hours ago











      • @StefanPinnow Oh sorry, thank you!

        – maxgonz
        9 hours ago

















      • That's not how the graph should look. Here is how it should look, sorry if I wasn't clear! link to the graph

        – maxgonz
        9 hours ago












      • That is exactly how the graph in the provided link looks like, besides that it isn't really smooth, because by default "only" 25 sample points are used. That is why AboAmmar suggested to increase samples to a higher number.

        – Stefan Pinnow
        9 hours ago











      • @StefanPinnow Oh sorry, thank you!

        – maxgonz
        9 hours ago
















      That's not how the graph should look. Here is how it should look, sorry if I wasn't clear! link to the graph

      – maxgonz
      9 hours ago






      That's not how the graph should look. Here is how it should look, sorry if I wasn't clear! link to the graph

      – maxgonz
      9 hours ago














      That is exactly how the graph in the provided link looks like, besides that it isn't really smooth, because by default "only" 25 sample points are used. That is why AboAmmar suggested to increase samples to a higher number.

      – Stefan Pinnow
      9 hours ago





      That is exactly how the graph in the provided link looks like, besides that it isn't really smooth, because by default "only" 25 sample points are used. That is why AboAmmar suggested to increase samples to a higher number.

      – Stefan Pinnow
      9 hours ago













      @StefanPinnow Oh sorry, thank you!

      – maxgonz
      9 hours ago





      @StefanPinnow Oh sorry, thank you!

      – maxgonz
      9 hours ago













      1


















      with plain TikZ:



      enter image description here



      documentclass[tikz,border=5mm]standalone
      begindocument
      begintikzpicture[yscale=1/30,xscale=1.2,
      declare function=
      f(x)=(6*x*x-3*x+4)/(2*x*x-8);
      ]
      defxmin-4 defxmax4
      defymin-100 defymax100

      draw[->] (xmin,0)--(xmax,0) node[below]$x$;
      draw[->] (0,ymin)--(0,ymax) node[right]$y$;
      draw (2,ymax)--(2,ymin) (-2,ymax)--(-2,ymin);
      draw[magenta,smooth,samples=100]
      plot[domain=-1.95:1.97] (x,f(x))
      plot[domain=2.03:3.8] (x,f(x))
      plot[domain=-3.8:-2.05] (x,f(x));
      draw
      (0,50)--+(0:1mm)--+(180:1mm) node[left]$50$
      (0,-50)--+(0:1mm)--+(180:1mm) node[left]$-50$;
      path
      (0,0) node[below left]O
      (2,0) node[below right]$2$
      (-2,0) node[below left]$-2$
      (current bounding box.north) node[above]
      The graph of $y=frac6x^2-3x+42x^2-8$;
      endtikzpicture
      enddocument





      share|improve this answer






























        1


















        with plain TikZ:



        enter image description here



        documentclass[tikz,border=5mm]standalone
        begindocument
        begintikzpicture[yscale=1/30,xscale=1.2,
        declare function=
        f(x)=(6*x*x-3*x+4)/(2*x*x-8);
        ]
        defxmin-4 defxmax4
        defymin-100 defymax100

        draw[->] (xmin,0)--(xmax,0) node[below]$x$;
        draw[->] (0,ymin)--(0,ymax) node[right]$y$;
        draw (2,ymax)--(2,ymin) (-2,ymax)--(-2,ymin);
        draw[magenta,smooth,samples=100]
        plot[domain=-1.95:1.97] (x,f(x))
        plot[domain=2.03:3.8] (x,f(x))
        plot[domain=-3.8:-2.05] (x,f(x));
        draw
        (0,50)--+(0:1mm)--+(180:1mm) node[left]$50$
        (0,-50)--+(0:1mm)--+(180:1mm) node[left]$-50$;
        path
        (0,0) node[below left]O
        (2,0) node[below right]$2$
        (-2,0) node[below left]$-2$
        (current bounding box.north) node[above]
        The graph of $y=frac6x^2-3x+42x^2-8$;
        endtikzpicture
        enddocument





        share|improve this answer




























          1














          1










          1









          with plain TikZ:



          enter image description here



          documentclass[tikz,border=5mm]standalone
          begindocument
          begintikzpicture[yscale=1/30,xscale=1.2,
          declare function=
          f(x)=(6*x*x-3*x+4)/(2*x*x-8);
          ]
          defxmin-4 defxmax4
          defymin-100 defymax100

          draw[->] (xmin,0)--(xmax,0) node[below]$x$;
          draw[->] (0,ymin)--(0,ymax) node[right]$y$;
          draw (2,ymax)--(2,ymin) (-2,ymax)--(-2,ymin);
          draw[magenta,smooth,samples=100]
          plot[domain=-1.95:1.97] (x,f(x))
          plot[domain=2.03:3.8] (x,f(x))
          plot[domain=-3.8:-2.05] (x,f(x));
          draw
          (0,50)--+(0:1mm)--+(180:1mm) node[left]$50$
          (0,-50)--+(0:1mm)--+(180:1mm) node[left]$-50$;
          path
          (0,0) node[below left]O
          (2,0) node[below right]$2$
          (-2,0) node[below left]$-2$
          (current bounding box.north) node[above]
          The graph of $y=frac6x^2-3x+42x^2-8$;
          endtikzpicture
          enddocument





          share|improve this answer














          with plain TikZ:



          enter image description here



          documentclass[tikz,border=5mm]standalone
          begindocument
          begintikzpicture[yscale=1/30,xscale=1.2,
          declare function=
          f(x)=(6*x*x-3*x+4)/(2*x*x-8);
          ]
          defxmin-4 defxmax4
          defymin-100 defymax100

          draw[->] (xmin,0)--(xmax,0) node[below]$x$;
          draw[->] (0,ymin)--(0,ymax) node[right]$y$;
          draw (2,ymax)--(2,ymin) (-2,ymax)--(-2,ymin);
          draw[magenta,smooth,samples=100]
          plot[domain=-1.95:1.97] (x,f(x))
          plot[domain=2.03:3.8] (x,f(x))
          plot[domain=-3.8:-2.05] (x,f(x));
          draw
          (0,50)--+(0:1mm)--+(180:1mm) node[left]$50$
          (0,-50)--+(0:1mm)--+(180:1mm) node[left]$-50$;
          path
          (0,0) node[below left]O
          (2,0) node[below right]$2$
          (-2,0) node[below left]$-2$
          (current bounding box.north) node[above]
          The graph of $y=frac6x^2-3x+42x^2-8$;
          endtikzpicture
          enddocument






          share|improve this answer













          share|improve this answer




          share|improve this answer



          share|improve this answer










          answered 8 hours ago









          Black MildBlack Mild

          2,2539 silver badges16 bronze badges




          2,2539 silver badges16 bronze badges
























              1


















              Hasty attempt with MetaPost and LuaLaTeX, using an old template of my own.



              documentclass[12pt,border=5mm]standalone
              usepackageluatex85, luamplib
              mplibsetformatmetafun
              mplibtextextlabelenable
              mplibnumbersystemdouble
              begindocument
              beginmplibcode

              vardef function(expr xmin, xmax, xstep)(text f_x) =
              save x; x := xmin;
              (x, f_x)
              forever: hide(x := x + xstep) exitif x > xmax;
              .. (x, f_x)
              endfor
              if x - xstep < xmax: hide(x := xmax) .. (x, f_x) fi
              enddef;

              u = v = .5cm;
              xmax = -xmin = 15; ymax = -ymin = 20; xstep := .01;

              vardef f(expr x) = (6(x**2)-3x+4)/(2(x**2)-8) enddef;

              beginfig(1);

              drawoptions(withcolor green);
              draw (-2u, ymin*v) -- (-2u, ymax*v);
              draw (2u, ymin*v) -- (2u, ymax*v);
              draw (xmin*u, 3v) -- (xmax*u, 3v);

              drawoptions(withcolor red);
              draw function(xmin, -2.1, .xstep)(f(x)) xyscaled (u,v);
              draw function(-1.9, 1.95, xstep)(f(x)) xyscaled (u,v);
              draw function(2.1, xmax, xstep)(f(x)) xyscaled (u,v);

              clip currentpicture to ((xmin, ymin) -- (xmax, ymin) -- (xmax, ymax) -- (xmin, ymax) -- cycle) xyscaled (u,v);

              drawoptions(withcolor black);
              drawarrow (xmin*u, 0) -- (xmax*u, 0);
              drawarrow (0, ymin*v) -- (0, ymax*v);

              for i = 1 upto floor(xmax.-1):
              draw (i*u, -2bp) -- (i*u, 2bp);
              draw (-i*u, -2bp) -- (-i*u, 2bp);
              endfor;

              for j = 1 upto floor(ymax-.1):
              draw (2bp, j*v) -- (-2bp, j*v);
              draw (2bp, -j*v) -- (-2bp, -j*v);
              endfor;

              label.bot("$x$", (xmax*u,0)); label.lft("$y$", (0, ymax*v));
              labeloffset := 5bp;
              label.bot("$-2$", (-2u,0)); label.bot("$2$", (2u, 0));
              label.lft("$3$", (0,3v));
              endfig;

              endmplibcode
              enddocument


              enter image description here






              share|improve this answer
































                1


















                Hasty attempt with MetaPost and LuaLaTeX, using an old template of my own.



                documentclass[12pt,border=5mm]standalone
                usepackageluatex85, luamplib
                mplibsetformatmetafun
                mplibtextextlabelenable
                mplibnumbersystemdouble
                begindocument
                beginmplibcode

                vardef function(expr xmin, xmax, xstep)(text f_x) =
                save x; x := xmin;
                (x, f_x)
                forever: hide(x := x + xstep) exitif x > xmax;
                .. (x, f_x)
                endfor
                if x - xstep < xmax: hide(x := xmax) .. (x, f_x) fi
                enddef;

                u = v = .5cm;
                xmax = -xmin = 15; ymax = -ymin = 20; xstep := .01;

                vardef f(expr x) = (6(x**2)-3x+4)/(2(x**2)-8) enddef;

                beginfig(1);

                drawoptions(withcolor green);
                draw (-2u, ymin*v) -- (-2u, ymax*v);
                draw (2u, ymin*v) -- (2u, ymax*v);
                draw (xmin*u, 3v) -- (xmax*u, 3v);

                drawoptions(withcolor red);
                draw function(xmin, -2.1, .xstep)(f(x)) xyscaled (u,v);
                draw function(-1.9, 1.95, xstep)(f(x)) xyscaled (u,v);
                draw function(2.1, xmax, xstep)(f(x)) xyscaled (u,v);

                clip currentpicture to ((xmin, ymin) -- (xmax, ymin) -- (xmax, ymax) -- (xmin, ymax) -- cycle) xyscaled (u,v);

                drawoptions(withcolor black);
                drawarrow (xmin*u, 0) -- (xmax*u, 0);
                drawarrow (0, ymin*v) -- (0, ymax*v);

                for i = 1 upto floor(xmax.-1):
                draw (i*u, -2bp) -- (i*u, 2bp);
                draw (-i*u, -2bp) -- (-i*u, 2bp);
                endfor;

                for j = 1 upto floor(ymax-.1):
                draw (2bp, j*v) -- (-2bp, j*v);
                draw (2bp, -j*v) -- (-2bp, -j*v);
                endfor;

                label.bot("$x$", (xmax*u,0)); label.lft("$y$", (0, ymax*v));
                labeloffset := 5bp;
                label.bot("$-2$", (-2u,0)); label.bot("$2$", (2u, 0));
                label.lft("$3$", (0,3v));
                endfig;

                endmplibcode
                enddocument


                enter image description here






                share|improve this answer






























                  1














                  1










                  1









                  Hasty attempt with MetaPost and LuaLaTeX, using an old template of my own.



                  documentclass[12pt,border=5mm]standalone
                  usepackageluatex85, luamplib
                  mplibsetformatmetafun
                  mplibtextextlabelenable
                  mplibnumbersystemdouble
                  begindocument
                  beginmplibcode

                  vardef function(expr xmin, xmax, xstep)(text f_x) =
                  save x; x := xmin;
                  (x, f_x)
                  forever: hide(x := x + xstep) exitif x > xmax;
                  .. (x, f_x)
                  endfor
                  if x - xstep < xmax: hide(x := xmax) .. (x, f_x) fi
                  enddef;

                  u = v = .5cm;
                  xmax = -xmin = 15; ymax = -ymin = 20; xstep := .01;

                  vardef f(expr x) = (6(x**2)-3x+4)/(2(x**2)-8) enddef;

                  beginfig(1);

                  drawoptions(withcolor green);
                  draw (-2u, ymin*v) -- (-2u, ymax*v);
                  draw (2u, ymin*v) -- (2u, ymax*v);
                  draw (xmin*u, 3v) -- (xmax*u, 3v);

                  drawoptions(withcolor red);
                  draw function(xmin, -2.1, .xstep)(f(x)) xyscaled (u,v);
                  draw function(-1.9, 1.95, xstep)(f(x)) xyscaled (u,v);
                  draw function(2.1, xmax, xstep)(f(x)) xyscaled (u,v);

                  clip currentpicture to ((xmin, ymin) -- (xmax, ymin) -- (xmax, ymax) -- (xmin, ymax) -- cycle) xyscaled (u,v);

                  drawoptions(withcolor black);
                  drawarrow (xmin*u, 0) -- (xmax*u, 0);
                  drawarrow (0, ymin*v) -- (0, ymax*v);

                  for i = 1 upto floor(xmax.-1):
                  draw (i*u, -2bp) -- (i*u, 2bp);
                  draw (-i*u, -2bp) -- (-i*u, 2bp);
                  endfor;

                  for j = 1 upto floor(ymax-.1):
                  draw (2bp, j*v) -- (-2bp, j*v);
                  draw (2bp, -j*v) -- (-2bp, -j*v);
                  endfor;

                  label.bot("$x$", (xmax*u,0)); label.lft("$y$", (0, ymax*v));
                  labeloffset := 5bp;
                  label.bot("$-2$", (-2u,0)); label.bot("$2$", (2u, 0));
                  label.lft("$3$", (0,3v));
                  endfig;

                  endmplibcode
                  enddocument


                  enter image description here






                  share|improve this answer
















                  Hasty attempt with MetaPost and LuaLaTeX, using an old template of my own.



                  documentclass[12pt,border=5mm]standalone
                  usepackageluatex85, luamplib
                  mplibsetformatmetafun
                  mplibtextextlabelenable
                  mplibnumbersystemdouble
                  begindocument
                  beginmplibcode

                  vardef function(expr xmin, xmax, xstep)(text f_x) =
                  save x; x := xmin;
                  (x, f_x)
                  forever: hide(x := x + xstep) exitif x > xmax;
                  .. (x, f_x)
                  endfor
                  if x - xstep < xmax: hide(x := xmax) .. (x, f_x) fi
                  enddef;

                  u = v = .5cm;
                  xmax = -xmin = 15; ymax = -ymin = 20; xstep := .01;

                  vardef f(expr x) = (6(x**2)-3x+4)/(2(x**2)-8) enddef;

                  beginfig(1);

                  drawoptions(withcolor green);
                  draw (-2u, ymin*v) -- (-2u, ymax*v);
                  draw (2u, ymin*v) -- (2u, ymax*v);
                  draw (xmin*u, 3v) -- (xmax*u, 3v);

                  drawoptions(withcolor red);
                  draw function(xmin, -2.1, .xstep)(f(x)) xyscaled (u,v);
                  draw function(-1.9, 1.95, xstep)(f(x)) xyscaled (u,v);
                  draw function(2.1, xmax, xstep)(f(x)) xyscaled (u,v);

                  clip currentpicture to ((xmin, ymin) -- (xmax, ymin) -- (xmax, ymax) -- (xmin, ymax) -- cycle) xyscaled (u,v);

                  drawoptions(withcolor black);
                  drawarrow (xmin*u, 0) -- (xmax*u, 0);
                  drawarrow (0, ymin*v) -- (0, ymax*v);

                  for i = 1 upto floor(xmax.-1):
                  draw (i*u, -2bp) -- (i*u, 2bp);
                  draw (-i*u, -2bp) -- (-i*u, 2bp);
                  endfor;

                  for j = 1 upto floor(ymax-.1):
                  draw (2bp, j*v) -- (-2bp, j*v);
                  draw (2bp, -j*v) -- (-2bp, -j*v);
                  endfor;

                  label.bot("$x$", (xmax*u,0)); label.lft("$y$", (0, ymax*v));
                  labeloffset := 5bp;
                  label.bot("$-2$", (-2u,0)); label.bot("$2$", (2u, 0));
                  label.lft("$3$", (0,3v));
                  endfig;

                  endmplibcode
                  enddocument


                  enter image description here







                  share|improve this answer















                  share|improve this answer




                  share|improve this answer



                  share|improve this answer








                  edited 8 hours ago

























                  answered 9 hours ago









                  Franck PastorFranck Pastor

                  16k1 gold badge39 silver badges62 bronze badges




                  16k1 gold badge39 silver badges62 bronze badges
























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









                      draft saved

                      draft discarded

















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












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











                      maxgonz 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%2f511206%2fim-trying-to-graph-a-rational-function%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

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її