Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2694 > unrolled thread
| Started by | Louis-Alexandre <laeh@nyu.edu> |
|---|---|
| First post | 2011-05-25 09:56 +0000 |
| Last post | 2011-05-25 23:33 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Multiple Subregions Background In a Grid Louis-Alexandre <laeh@nyu.edu> - 2011-05-25 09:56 +0000
Re: Multiple Subregions Background In a Grid Peter Breitfeld <phbrf@t-online.de> - 2011-05-25 23:34 +0000
Re: Multiple Subregions Background In a Grid Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-05-25 23:33 +0000
| From | Louis-Alexandre <laeh@nyu.edu> |
|---|---|
| Date | 2011-05-25 09:56 +0000 |
| Subject | Multiple Subregions Background In a Grid |
| Message-ID | <irijof$qe2$1@smc.vnet.net> |
Dear All,
I can`t figure out how to define several subregions with different color background as in the below.
Any Idea ?
Many thanks,
LA
Grid[Table["g", {4}, {7}],
Background -> {None, None, {{{1, 3}, {1, 3}} -> LightRed}}]
[toc] | [next] | [standalone]
| From | Peter Breitfeld <phbrf@t-online.de> |
|---|---|
| Date | 2011-05-25 23:34 +0000 |
| Message-ID | <irk3mv$7ci$1@smc.vnet.net> |
| In reply to | #2694 |
Maybe you want something like this, using Item:
tab=Table["g",{4},{7}];
tab[[1,3]]=Item[tab[[1,3]],Background->LightRed];
Grid[tab,Background->None]
If you want a subregion, you may replace the second row from above with
D[tab[[i,j]]=Item[tab[[i,j]],Background->LightRed],{i,1,2},{j,3,5}]
//Peter
Louis-Alexandre wrote:
> Dear All,
>
> I can`t figure out how to define several subregions with different
> color background as in the below.
>
> Any Idea ?
>
> Many thanks,
>
> LA
>
>
> Grid[Table["g", {4}, {7}],
> Background -> {None, None, {{{1, 3}, {1, 3}} -> LightRed}}]
>
--
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de
[toc] | [prev] | [next] | [standalone]
| From | Armand Tamzarian <mike.honeychurch@gmail.com> |
|---|---|
| Date | 2011-05-25 23:33 +0000 |
| Message-ID | <irk3ju$79v$1@smc.vnet.net> |
| In reply to | #2694 |
On May 25, 7:56 pm, Louis-Alexandre <l...@nyu.edu> wrote:
> Dear All,
>
> I can`t figure out how to define several subregions with different color =
background as in the below.
>
> Any Idea ?
>
> Many thanks,
>
> LA
>
> Grid[Table["g", {4}, {7}],
> Background -> {None, None, {{{1, 3}, {1, 3}} -> LightRed}}]
Just include each subregion in your list (I'm assuming this is what
you have in mind?):
Grid[Table["g", {4}, {7}],
Background -> {None, None, {{{1, 3}, {1, 3}} -> LightRed, {{3, 4},
{5, 7}} -> LightRed}}]
Mike
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web