Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3973 > unrolled thread
| Started by | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| First post | 2011-07-26 11:05 +0000 |
| Last post | 2011-07-27 10:17 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Grid Divider Style With Background Colors Heike Gramberg <heike.gramberg@gmail.com> - 2011-07-26 11:05 +0000
Re: Grid Divider Style With Background Colors Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-07-27 10:17 +0000
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Date | 2011-07-26 11:05 +0000 |
| Subject | Re: Grid Divider Style With Background Colors |
| Message-ID | <j0m724$8va$1@smc.vnet.net> |
You could do something like
With[{gap = 1, elemWidth=3, h = 8, w = 7},
mat = RandomInteger[10, {h, w}];
colours = Table[Blend[{Lighter[Blue], Pink}, j/w], {i, h}, {j, w}];
Framed[Grid[
MapThread[
Framed[Pane[#1, Scaled[1]], ImageMargins -> gap,
Background -> #2] &, {mat, colours}, 2], Spacings -> {0, 0},
ItemSize -> elemWidth], FrameMargins -> gap]]
elemWidth is the width of the elements in the Grid and gap the distance between the lines.
Heike
On 25 Jul 2011, at 12:28, Don wrote:
> Mathematica permits divider lines between rows and columns in a table
> (grid) such
> as this example from the documentation:
>
> Grid[Table[x, {4}, {11}], Dividers -> {{{{True, False}}, -1 -> True},
> False}]
>
> But, the dividers are single lines only.
>
> Sometimes double line dividers are desired
> as shown in this table on the Web:
>
> http://www.assetcorrelation.com/user/correlations/90
>
> Notice that the background color for an item is only within
> the inside line of a double line divider.
>
> Is there any way to produce (a) this kind of divider (double line)
> and (b) with background colors for specific items that don't cross
> the inside line of the double line divider?
>
> Thank you in advance.
>
> Don
>
[toc] | [next] | [standalone]
| From | Armand Tamzarian <mike.honeychurch@gmail.com> |
|---|---|
| Date | 2011-07-27 10:17 +0000 |
| Message-ID | <j0ooj5$kqj$1@smc.vnet.net> |
| In reply to | #3973 |
On Jul 26, 9:05 pm, Heike Gramberg <heike.gramb...@gmail.com> wrote:
> You could do something like
>
> With[{gap = 1, elemWidth=3, h = 8, w = 7},
> mat = RandomInteger[10, {h, w}];
> colours = Table[Blend[{Lighter[Blue], Pink}, j/w], {i, h}, {j, w}];
> Framed[Grid[
> MapThread[
> Framed[Pane[#1, Scaled[1]], ImageMargins -> gap,
> Background -> #2] &, {mat, colours}, 2], Spacings -> {0, 0},
> ItemSize -> elemWidth], FrameMargins -> gap]]
>
> elemWidth is the width of the elements in the Grid and gap the distance between the lines.
>
> Heike
>
> On 25 Jul 2011, at 12:28, Don wrote:
>
>
>
>
>
>
>
> > Mathematica permits divider lines between rows and columns in a table
> > (grid) such
> > as this example from the documentation:
>
> > Grid[Table[x, {4}, {11}], Dividers -> {{{{True, False}}, -1 -> True},
> > False}]
>
> > But, the dividers are single lines only.
>
> > Sometimes double line dividers are desired
> > as shown in this table on the Web:
>
> >http://www.assetcorrelation.com/user/correlations/90
>
> > Notice that the background color for an item is only within
> > the inside line of a double line divider.
>
> > Is there any way to produce (a) this kind of divider (double line)
> > and (b) with background colors for specific items that don't cross
> > the inside line of the double line divider?
>
> > Thank you in advance.
>
> > Don
nicely done!
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web