LaTeX forum ⇒ Graphics, Figures & TablesGraphing Inequalties

Information and discussion about graphics, figures & tables in LaTeX documents.
Posts: 42
Joined: Fri Oct 17, 2008 5:55 pm

Graphing Inequalties

Postby Mikerada6 » Wed Feb 02, 2011 4:12 pm

How would I create a graph of an inequality in latex? I want to be able to graph a problem such as x>5 or x<=7. If it has two variables such as x-y<9 I can use maple to graph it and then export the image. However maple is unable to graph a simple one variable inequality. Are there any packages that could be used to create a number line and then add the correct information such as open/close circles, shaded the correct side and the appropriate numbers along the bottom?

Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Postby Mini » Thu Feb 03, 2011 7:58 am


Posts: 1
Joined: Mon May 05, 2014 4:49 pm

Postby ronbannon » Mon May 05, 2014 5:15 pm

I too would like to do this. Ideally, I'd love to enter an interval, including unions of intervals, and have a default number line graph generated. Or, even better, have some way to take a single variable inequality and auto generate a graphical solution. Usually I just generate a pdf graph and then include the image, but that's a lot of work and I am looking for a better way.

Does anyone have an idea how to code this?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9565
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon May 05, 2014 9:28 pm

I would use TikZ or pgfplots for this. Both can fill the area under a line or a curve, even between given curves. See filling plots for examples, lines or inequalities would even be easier than complex curves.

Stefan admin

Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 6 guests