Skip to main content
deleted 23 characters in body; edited title
Source Link
Jules Manson
  • 2.5k
  • 11
  • 19

How to style a row of data inlists of lists created with a Table and return entire Tableall lists?

I want to return a list of all lists with elements in a single first list styled if it meets a condition so that it stands out from other lists. My attempt at this only returns the styled listall data with enclosing curly brackets also highlighted. Curly brackets should not be highlightedno row styled. Here is what i have...

eqs = {eqn = S'[t] + .1 S[t] == 0, ic = S[0] == 30000};
sol = DSolve[eqs, S[t], t][[1, 1, 2]];
raw = Table[{t, sol}, {t, 0, 15}];
yr = Select[raw, #[[2]] < 8000 &, 1][[1, 1]]1]];
data = MapAt[PaddedForm[#, {5, 2}] &, raw, {All, 2}]];
Style[data[[yrMap[Style[#, +Bold, 1Green] &, 1data[[yr ;;+ 2]],1]]] Bold,(* Green]proof of concept *)
data = Replace[data,  
data[[yr + 1]] -> Style[#Map[Style[#, Bold, Green] &]&, data[[yr + 1]]]]

How to style a row of data in a Table and return entire Table?

I want to return a list of all lists with elements in a single first list styled if it meets a condition so that it stands out from other lists. My attempt at this only returns the styled list with enclosing curly brackets also highlighted. Curly brackets should not be highlighted. Here is what i have...

eqs = {eqn = S'[t] + .1 S[t] == 0, ic = S[0] == 30000};
sol = DSolve[eqs, S[t], t][[1, 1, 2]];
raw = Table[{t, sol}, {t, 0, 15}];
yr = Select[raw, #[[2]] < 8000 &, 1][[1, 1]]
data = MapAt[PaddedForm[#, {5, 2}] &, raw, {All, 2}]
Style[data[[yr + 1, 1 ;; 2]], Bold, Green]
data = Replace[data, data[[yr + 1]] -> Style[#, Bold, Green] &]

How to style a row of lists of lists created with a Table and return all lists?

I want to return a list of all lists with elements in a single first list styled if it meets a condition so that it stands out from other lists. My attempt at this only returns all data with no row styled. Here is what i have...

eqs = {eqn = S'[t] + .1 S[t] == 0, ic = S[0] == 30000};
sol = DSolve[eqs, S[t], t][[1, 1, 2]];
raw = Table[{t, sol}, {t, 0, 15}];
yr = Select[raw, #[[2]] < 8000 &, 1][[1, 1]];
data = MapAt[PaddedForm[#, {5, 2}] &, raw, {All, 2}];
Map[Style[#, Bold, Green] &, data[[yr + 1]]] (* proof of concept *)
data = Replace[data,  
data[[yr + 1]] -> Map[Style[#, Bold, Green] &, data[[yr + 1]]]]
Source Link
Jules Manson
  • 2.5k
  • 11
  • 19

How to style a row of data in a Table and return entire Table?

I want to return a list of all lists with elements in a single first list styled if it meets a condition so that it stands out from other lists. My attempt at this only returns the styled list with enclosing curly brackets also highlighted. Curly brackets should not be highlighted. Here is what i have...

eqs = {eqn = S'[t] + .1 S[t] == 0, ic = S[0] == 30000};
sol = DSolve[eqs, S[t], t][[1, 1, 2]];
raw = Table[{t, sol}, {t, 0, 15}];
yr = Select[raw, #[[2]] < 8000 &, 1][[1, 1]]
data = MapAt[PaddedForm[#, {5, 2}] &, raw, {All, 2}]
Style[data[[yr + 1, 1 ;; 2]], Bold, Green]
data = Replace[data, data[[yr + 1]] -> Style[#, Bold, Green] &]