Graphics, Figures & TablesTikz Shading/Plot

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kapowza
Posts: 19
Joined: Fri Jan 30, 2009 3:32 pm

Tikz Shading/Plot

Post by kapowza »

I've been trying out Tikz recently and going through the manual. I understand that, to plot a function, I just use something like \draw plot function{x*x};

I was wondering - is there a relatively easy way to shade the region between the curve and the x-axis between, say, x = 1 and x = 2?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Tikz Shading/Plot

Post by localghost »

I guess the example from the pgf/tikZ manual (Part V - Utilities, p. 375) explains best what to do in this case. Call the manual on the command prompt of your machine.

Code: Select all

texdoc pgf

Best regards
Thorsten¹
Post Reply