# Re: st: creating a difficult graph (not sure what to call it)

 From Ulrich Kohler To statalist@hsphsun2.harvard.edu Subject Re: st: creating a difficult graph (not sure what to call it) Date Fri, 29 Nov 2002 10:56:12 +0100

```> I am hoping to create a graph which is an X by Y matrix.  Each cell is
> shaded according to the percentage of observations in that cell (in some
> sense this is a table in graphical form).  Does anyone have any ideas how
> to approach this in stata?  Maybe an example will help:
>
> X is industries, Y is occupations:  the graph would look like this where
> letters represent shadings based on the % in each cell
>
> 	   1	    2	    3            4
> 	---------------------------------
>    1	|  lllll	|  lllll	|  mmm	| mmm	|
> 	---------------------------------
>    2	| dddd	|  ddd	|  lllll	| mmm	|
> 	---------------------------------
>    3	| llllll	| mmm	| llll	| ddd	|
> 	---------------------------------
>    4	| dddd	|  mmm	| dddd	| llllll	|
> 	---------------------------------
>
> Or is the easier to do in excel?

What is excel? As far as I understand this, you have two variables (x and y)
with just a few categories. If so, you might try heavy jittering. Something
like

. graph y x, yline(0.5(1)4.5) xline(0.5(1)4.5) xlab(1(1)4) ylab(1(1)4) /*
*/ jitter(20) xscale(0,5) yscale(0,5)

(Fiddle around with the number in jitter. It can be between up to 30. -help
grtwoway- states that jitter(5) is already large)

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```