The shading operation consist of let a background picture be rendered with different gradients of colors or light/dark. The {shading} tag is related to questions in which a shade operation is required.

learn more… | top users | synonyms

31
votes
4answers
5k views

How to draw a shaded sphere?

Andrew Stacey pointed out that the Rosetta Code entry "Draw a Sphere" doesn't have a TikZ entry yet. Is there a way to draw a "properly" shaded sphere using TikZ? The ball shading would seem an ...
29
votes
3answers
1k views

How to pimp my tube?

How can I pimp my tube? \documentclass{scrartcl} % needs logicpuzzle bundle v1.8 % http://mirrors.ctan.org/graphics/pgf/contrib/logicpuzzle/logicpuzzle.sty % or replace logicpuzzle -> battleship ...
26
votes
1answer
1k views

TikZ: drawing 3 intersecting circles and shading

How can I draw the three intersection circles/ellipse with that shading paradigm (not necessarily the same colors) effectively? It appears that the original image doesn't have overlapping colors ...
23
votes
4answers
806 views

Can fuzzy borders be added to external pictures programmatically?

In my opinion, external pictures are often more pleasing to the eye on a white background when they have fuzzy rather than "sharp" borders. For instance, compare this to that Adding fuzzy ...
20
votes
4answers
951 views

How to shade text in different colors?

I need a single character in two colors. Figuring I could use the shadings library of TikZ, I followed the manual (section 23.4.1, the TikZ example): \documentclass{article} \usepackage{tikz} ...
18
votes
3answers
2k views

TikZ: radial shading of a ring

I would like to have a radial shading of a ring, from inner color (red) at inner radius r1 > 0 to outer color (white) at outer radius r2 > r1. But with \filldraw[even odd rule,inner color=red,outer ...
17
votes
3answers
3k views

Is there a way to tune ball shading in TikZ ?

I want to create a Go stone in TikZ. "ball color" option in node style is almost OK. Here is my result: But I don't like the stones, they are "too balish". The "reflection" should be less spot-on ...
16
votes
1answer
915 views

Path following color gradient in TikZ

How can I get a path following color gradient in TikZ? Here a quick example of the idea. On the left the result I'm looking for and on the right an example of a non path following gradient applied on ...
15
votes
1answer
1k views

How to create a ball shading and to customize 3D lighting manually?

TikZ shading=ball will create a perfect 3D ball perspective, but it has no option to change the lighting angle, the contract, radius of light, etc (or I am not aware of). I tried to create a 3D ball ...
14
votes
2answers
3k views

Set table background hatched and shaded using tikz

I am looking for a convenient way to set the background of tabular cells. I'd like to do two things: (1) Set the background shaded in a color (2) Set the background hatched I learned that the TikZ ...
13
votes
3answers
759 views

Shading an area bounded by curved paths between nodes

I am drawing a graph of sorts in TikZ, and I have several connected nodes in a cycle, and I would like to shade the area bounded by paths between those nodes. My problem is that the shading is not ...
13
votes
1answer
2k views

TikZ, 3d library and circle fading

I'm using the 3d library to put a circle on the z=0 plane, and other things. I'd like to fade this circle radially, but the result isn't as I would expect because the fading is not proportional to the ...
13
votes
2answers
756 views

TikZ: shade also the border of a node

I would like to shade a node and the border of the node. The following code works but I don't like it very much that I have to draw something after the node on the background layer. I would prefer a ...
13
votes
1answer
768 views

Tikz: Shading a path without any filling

How can I shade a path witout filling? In particular, I wand to draw a curved arrow that starts colored blue and ends colored green, where in between it gradually changes its color. I can't find a way ...
12
votes
4answers
2k views

Tikz: shading region bounded by several curves

I know that my effort below can be improved upon considerably. In particular, there must be a way of shading the region in a single scope, as opposed to subdividing as I have done (thus necessitating ...
12
votes
2answers
557 views

Gaussian ellipsoids using tikz

I'm trying to draw illustrations of Gaussian ellipsoids using shaded ellipses. In simple terms what I'm after is a way to have a light shade throughout the outer edge of the ellipse and a darker shade ...
12
votes
2answers
199 views

TikZ/PGF - switching off shading

Is there a way to switch off shading for one node, in a scope where the nodes are shaded? In other words, I want something like shading=none, but did not find it. Motivation: \documentclass{article} ...
11
votes
2answers
4k views

Cylinder shading with PGF/TikZ

I'm trying to create a cylinder with 3D shading effects. The cylinders in the picture are standing vertically, and have a body and an end. I'd like the body to be shaded so that it varies uniformly ...
11
votes
2answers
273 views

How can I draw a curved gradient/fade in tikz?

I would like to draw something like the following diagram: My problem is drawing the grey curved path that fades away. The direction of the fading continually changes so that it is always ...
10
votes
1answer
488 views

Transparent shade using TikZ

I wonder whether it is possible to create a transparent shading effect (like the one below) without an exact specification of the fill color. This solution is good until I have to change the ...
10
votes
1answer
1k views

Shaded continuous across new enumerate environment

I'm trying to write up solutions where I include the original problem text, in a light gray shaded box. I had been creating the shading with the 'framed' package shaded environment, but some of the ...
10
votes
1answer
381 views

How do I force tikz to use CMYK everywhere (also in shadings)?

I'm doing a poster with the baposter which uses tikz and at some point realized that some colors that should be identical are not. It turns out that tikz apparently resorts to RGB color space as soon ...
9
votes
4answers
954 views

How do I shade an area in pgfplots?

How do I create a shaded area in a polygon created by plot intersections? In this case, up to the solid line without circle marks. \documentclass{article} \usepackage{pgfplots} ...
9
votes
3answers
357 views

How can I shade from red to green along a curve?

Let's take the following picture as an example. I want to shade the fan-shaped area from red to green along the curve shown with the arrow in TikZ. How can I do this? Code: ...
9
votes
2answers
704 views

Is lualatex supposed to be a superset of pdflatex? (regarding production of PDF)

In other words, is it a bug if lualatex cannot compile a document that pdflatex can? Based on the answers to this question How to expand TeX's "main memory size"? (pgfplots memory ...
9
votes
2answers
319 views

Quoting styles, technical an appreciation questions

I know there has been some questions about the quote style, I loved the one with the big quote marks. What I'm trying to achieve it's a little simpler. Right now I have something like this: ...
9
votes
1answer
329 views

Shading over a single page

I want to generate shading color in background for a single page. How can I implement this?
9
votes
1answer
197 views

How do I shade various regions defined by a hobby curve?

Use the following code, I am able to generate the curve easily. \documentclass{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \usetikzlibrary{hobby} \begin{document} ...
9
votes
2answers
304 views

3D font in LaTeX

This is an unusual question regarding rendering of a font with a specific 3D-esque style in LaTeX, XeLaTex, or any other TeX flavor. I was looking at some fonts the other day and I came across one of ...
8
votes
3answers
331 views

How to learn to create General (Functional) Shadings wifth pgf?

In the section called General (Functional) Shadings in the PGF/TikZ manual, there is an "explanation" of the command to create a general functional shading. The author of this section assumes that ...
8
votes
1answer
957 views

How to shade mindmap concepts?

I tried to add a shade on my mindmap's concepts with \begin{tikzpicture}[mindmap, text=white, every concept/.append style={circle,shading=ball, ball color=black!20!white!20}] but the problem is ...
8
votes
1answer
403 views

“Countryball” comic with TikZ. How to shade a 3D object with different stripes on it?

Countryball (if I'm not mistaken originally Polandball) is a web comic versing on crude political jokes, some of which I find hilarious. In some sense, the idea is analogous to the spherical cow ...
8
votes
1answer
458 views

How to use ball shading on non-circle shapes?

If using ball shading on non-circle elements, it will well apply the shading effect, but it will use the default blue color. How to use ball shading with the element color. \node[text ...
8
votes
1answer
446 views

TikZ shadings and printing incompatibility

I would like to use some effects provided by the shadings library of tikz. More specifically, I am trying to use the ball and radial shadings (tikz 2.10 manual, p. 412-). The resulting pdf looks ok ...
8
votes
1answer
224 views

Drawing balls in a rectangle

I am trying to replicate the following figure here and this is what I have so far \documentclass[12pt,a4paper]{standalone} \usepackage{tikz,tkz-euclide,pgfplots} \usetkzobj{all} ...
7
votes
2answers
359 views

TikZ shaded translated regions defined by boundaries of shape nodes and lines

Given a lattice made up of shapes, how do I shade the regions (and their translates) defined by the boundaries of these nodes and lines going through these shapes? In my particular case, I have a ...
7
votes
1answer
383 views

How to shade a line and how to offset a line?

Newbie here. Could anyone tell me how to (1) shade a line and (2) how to offset a line? I have a very simple graph, This is a mesh used in finite element analysis, I have already used tikz to build ...
7
votes
1answer
171 views

Combining shading and transparency in TikZ

With this code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill[shading=radial] (0,5) circle (2); \fill[top color=black] (5,3) rectangle (9,7); ...
7
votes
0answers
107 views

How to create a line with “radial” shading? [duplicate]

How would you draw a black line with TikZ that shades to white/transparent radially (like this) between two coordinates? Shading is possible for rectangles (TikZ documentation, Ch. 46), though I can ...
6
votes
3answers
9k views

How to change the background color of \framebox?

I'm trying to change a picture drawn using the plain picture environment and I need to change the background color of certain \framebox to lightgrey. Is it possible? I know that there are more ...
6
votes
2answers
236 views

How to create a color wheel shading with other colors?

In the pgf manual one can get a circle with a jet-colormap color-wheel-shading with: \tikz \shade[shading=color wheel] (0,0) circle (1.5); How can I get the same but with another colormap? This ...
6
votes
2answers
127 views

How to add a shadow to a tikz line?

I have the following tikz picture. \documentclass{standalone} \usepackage{tikz} \usepackage{xcolor} \begin{document} \begin{tikzpicture}[ arr/.style={->, blue, very thick}, ...
6
votes
1answer
139 views

How can I have a horizontally shaded block title in beamer?

\documentclass{beamer} \usetheme{Rochester} \setbeamertemplate{block title}[horizontal shading][left=black, right=white] \begin{document} \begin{frame} \frametitle{MWE} \begin{block}{Title} ...
6
votes
1answer
211 views

Shaded multicols II

In extending a previous question, Shaded multicols, how can I put rounded corners on the multicol environment, for the outer 4 corners (ie the corners directly next to the page margins) This question ...
6
votes
1answer
282 views

Shaded box with section number

The code below is not working. This is because, I have savenotes in my TeX file, it works when I remove savenotes. Is there a way that I can get the code working without removing savenotes? Here is ...
6
votes
1answer
521 views

More on “Cylinder shading with pgf TiKZ”

In his answer to Cylinder shading with PGF/TikZ, Jake provides a code to draw a shaded cylinder with a not shaded top. This code draws a cylinder node (from shapes.geometric library) and after that, ...
6
votes
1answer
1k views

Fading a path in TikZ

I want to draw a path/plot in TikZ whose shade depends on the coordinate. For example, I want say something like \draw[color=black!\x] plot coordinates{ coord1 ... coord100}; i.e. the shade of the ...
6
votes
1answer
282 views

Shading in TikZ calendar

I’ve produced the calendar below with TikZ but I think the colourings need to be made more salient by shading a box around the coloured dates (as there will be four of these years on a page and the ...
6
votes
1answer
156 views

How to use i.e. left, middle and right color when using draw as an argument instead of a command?

I'm forced to define colors within my tikzset for one of my projects. This requires me to use the draw command within my tikzset to set a color. Normally I can just use, say \draw command to just ...
5
votes
3answers
202 views

Is it possible to shade an area of a picture using the xcolor package?

I want to shade an area of of picture I have created in the environment \picture. Is there anyway I can shade this by setting it between co-ordinates? i.e. could I shade in blue the area between ...