New answers tagged

0

Here's my suggestion from the comments. Notice how easy and safe it is $USD /: Times[n_, $USD] := Quantity[n, "USDollars"]; $USD /: Times[$USD, n_] := Quantity[n, "USDollars"]; 3342.56 $USD + 1000 $USD + 100.5 $USD + 45.35 $USD*1.57 Quantity[4514.2595, "USDollars"] It...just works. And it uses all of the built-in Quantity ...


5

Format is very useful for changing the display form of expressions in general: Format[young[x___], StandardForm] := Grid[x] After evaluating this, all subsequent outputs of the form young[...] (which are typically in StandardForm) will be printed with Grid applied to the arguments.


1

PlotRangePadding is the option you are not controlling. Set it to None to get the control you seek. data = Table[{x, 1}, {x, -2., 2.}]; plt1 = ListPlot[data, PlotRange -> {{-2., 2.}, {0., Sqrt[2.]}}, PlotLabels -> "PlotLabels and AspectRatio", AspectRatio -> .353553, PlotRangePadding -> None] Set to larger values if desired (see ...


3

Using Grid and selecting text to display grid[data_] := Grid[data, Background -> {None, 1 -> LightYellow}, Dividers -> Center] heading = (ip[[1, 1 ;; 8]] // Map[Select[# != "" &]]) //. {} -> Nothing // Flatten // First Grid[{{heading, SpanFromLeft}, {grid@ip[[1, 9 ;;]], Splice@Table[grid[ip[[i]]], {i, 2, Length@ip}]}}, ...


6

Maybe something like this? The following function will divide the available screen width into equally sized columns and then uses scrollbars to display content when it becomes too tall: readableGrid[content_List, maxRowHeight : _ : 50, gridOpts : OptionsPattern[]] := Grid[ Map[ Pane[#, ImageSize -> {Full, UpTo[maxRowHeight]}, Scrollbars -> {...


Top 50 recent answers are included