Graphics, Figures & Tables ⇒ Graphing Inequalties
Graphing Inequalties
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?
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Graphing Inequalties
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?
Does anyone have an idea how to code this?
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
Graphing Inequalties
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
Stefan
LaTeX.org admin