Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: automatic grid
Replies: 1   Last Post: Jun 22, 2013 8:40 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
David Park

Posts: 1,560
Registered: 5/19/07
Re: automatic grid
Posted: Jun 22, 2013 8:40 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

veamos1 = {"V1", "V2", "V3", "V4"};
veamos2 = {5, 20, 7, 11};
Grid[{veamos1, veamos2}] /.
n_Integer?(# > 10 &) :> Item[n, BaseStyle -> {FontColor -> Red}]


David Park
djmpark@comcast.net
http://home.comcast.net/~djmpark/index.html


From: Francisco Gutierrez [mailto:fgutiers2002@yahoo.com]

Dear Group:
I have a grid (in reality, a collection of grids) and would like to make
Mathematica give each entry of the grid a style depending on its value.
For example:
Aveamos1= {"V1","V2",V3", "V4"}
veamos2={5,20,7,11}
Grid[{veamos1,veamos2}]
Suppose that I want any value above 10 to be coloured in red. How can I
manage to do this?
Thanks
Francisco





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.