Tag Info

15

Mathematica has lots of Graphics primitives for you to work with, as well as directives such as Thick, Dashed, Red, etc. I'll use Arrow below. You can specify the value of the GridLines option as a function. Using GridLines -> Range will give lines on a 1:1 grid starting from the extreme lower left of the graphic, as set with PlotRange or determined ...

14

GraphicsRow takes a PlotLabel option: p1 = Plot[Sin[x], {x, 0, Pi}, PlotLabel -> Sin]; p2 = Plot[Cos[x], {x, 0, Pi}, PlotLabel -> Cos]; GraphicsRow[{p1, p2}, PlotLabel -> "Two plots"]

11

While drag'n'drop isn't officially supported in Mathematica currently (Depending on your definition of support), I believe Wolfram is working on it for a future version, or at least more direct support. I can't remember which screencast, but something was mentioned about this in one of Steven Wolframs talks posted on the official Mathematica blog. Now to ...

8

Depending on what you are doing, this might be better solved by using Graphics commands and building the display as a graphics object rather than a textural output. This however does the trick with just inserting elements into the grid shape: gridDots[a_] := Module[{ rowspacing = Riffle[#, " ", {1, 1 + Last@Dimensions[a] 2, 2}] &, colspacing = ...

8

GridLines works in Graphics Graphics[{ {Thick, Darker[Red], Arrow[{{0, 0}, {1, 1}}]}, {Dashed, Arrow[{{0, 0}, {1, 0}}]}, {Dashed, Arrow[{{1, 0}, {1, 1}}]}, Text[Style["R", Italic, Large], {.5, .5}, {0, -1}], Text[Style["\[Theta]", Large], {.2, .1}, {-1, 0}] }, GridLines -> Automatic, GridLinesStyle -> LightGray, PlotRange -> {{-1, 2}, ...

7

Slightly less dirty: d = 10; t = Table[x, {d}, {d}]; Grid[MapAt[Item[#, Frame -> White] &, t, Tuples[{Range@d, {-2, -1}}]], Dividers -> {#, #} &@Thread[(# -> Black &)[Range[3, d, 2]]]]

7

Possibly more versatile, but you have to mess with text overlapping your plots, but GraphicsRow also accepts Epilog GraphicsRow[{Plot[Sin[x], {x, 0, 4 Pi}], Plot[Cos[x], {x, 0, 4 Pi}]}, Spacings -> Scaled[0.4], Epilog -> Inset["Plot Title", Scaled[{0.5, 0.95}]]]

7

When I need more interface control, I usually do something like this: p1=Plot[Sin[x],{x,0,Pi},PlotLabel->Sin,ImageSize->150]; p2=Plot[Cos[x],{x,0,Pi},PlotLabel->Cos,ImageSize->150]; title=Panel[Style["Test Label",White,20],ImageSize->300,Background->Orange,Alignment->Center]; ...

6

DynamicModule[{n = 3, prefTable = ConstantArray[0, {3, 20, 7}], lastName = ConstantArray["", {3}], firstName = ConstantArray["", {3}], ws = ConstantArray[0, {3}], wsAmount = ConstantArray[Null, {3}], wkndPref = ConstantArray[Null, {3}], tabLabel = Array["Worker " <> ToString[#] &, {3}], hours = DateString[DatePlus[{2012, 1, 1, 7, ...

6

If you select your output cell (by the bracket on the right), it can be converted to bitmap via the Cell $\rightarrow$ Convert To $\rightarrow$ Bitmap menu option. For programmatic conversion: If you prefer bitmaps, you can rasterize your table: table = TableForm[{{5, 7}, {4, 2}, {10, 3}}, TableHeadings -> {{"A", "B", "C"}, {"1", "2"}}]; ...

6

Maybe evenrows = Prepend[#, " "] & /@ (Join @@ Thread[{#, " "}] & /@ a); oddrows = (Join @@ ConstantArray[{"\[CenterDot]", " "}, 8]); Grid@Riffle[evenrows, {oddrows}, {1, -1, 2}] ?

6

You are asking: Is there a simple option to add additional grid lines to the automatic ones? Thank you! Well, I couldn't think of one, but out of curiosity I tried another approach (different to the Epilog I'd also rather choose). It seems to work pretty ok, so I figured I might share. As the other answer is much more versatile, I didn't spend too ...

6

Not sure why J.M.'s comment doesn't meet your requirements: DateListPlot[ RandomReal[1, 20], {2000}, Joined -> True, PlotRange -> All, GridLines -> {Automatic, None}, Epilog -> {Directive[Thick, Magenta], Line[ {Scaled[{0, -1}, {{2010, 1, 15}, 0}], Scaled[{0, 1}, {{2010, 1, 15}, 0}] }]}] This incorporates Scaled, ...

6

Say you have two Grid: First place the cursor at the end of the last row: Then use menu command Add Row (please note the short-cut) to add as many rows as g2 has: Then copy g2 by dragging from the items (not by select the whole grid or cell!): Then select all empty rows you just created in g1 and paste:

6

As Pinguin Dirk comments there is an example of exactly this in the documentation: Grid[Table[x, {4}, {7}], Background -> {None, None, {{1, 1} -> Pink, {3, 3} -> Red}}] Those who value brevity may wish to note that implicit Null may be used in place of None: Background -> {, , {{1, 1} -> Pink, {3, 3} -> Red}} You can also use Item ...

5

Update 3: Dealing with subgrids with different number of columns: The main difficulty with differing number of columns is that both Spacings and ItemSizes in the subgrids have to be taken into account to get the same total width for all the subgrids. With $m$ subgrids indexed $i=1, ..., m$, where subgrid $g_i$ has $n_i$ columns with column widths w_{i ... 5 I've started from the beginning, but with Grid with number of rows equal to 2*Length[range] and SpanFromAbove inside: diffT[f_, range_, columns_] := Module[{n = Length@range, RF, dif, grid, form}, RF = Append[Evaluate@Riffle[#, SpanFromAbove], SpanFromAbove] &; form = NumberForm[N@#, {5, 4}] &; dif = ... 5 You can play with ItemSizes to make sure that the itemsizes in the two sub-grids are in alignment. For example: Grid[{{"12", Grid[{{"1", "2"}, {Item["foo", ItemSize -> {5, 3}], Item["bar", ItemSize -> {10, 3}]}}, Dividers -> All, Alignment -> {Center, Center}]}, {"xxxx", Grid[{{"1", "2"}, {Item["foo", ItemSize -> {10, ... 5 You can explicitly frame only those elements and not frame the rest. For example: Grid[tab, Frame -> {None, None, {{1, 1} -> True, {1, 2} -> True}}] To extend this to grids withn$columns in the header, you could replace the last element of the RHS of the Frame option with Table[{1, i} -> True, {i, n}] where n is an integer. 5 Build in interface Undocumented and I don't know how to fully customize it but it seems it is something you're looking for: TableView[RandomChoice[{0, 1}, {10, 10}]] rubenko deliverd it here with a link to some info. As Jens have noticed it is not so great but You have to judge it by yourself. Custom interface If you do not need to have fully ... 5 Updated Using ToBoxes@Column[{Row[{"test", "1"}]}] we get TagBox[GridBox[{{TemplateBox[{"\"test\"", "\"1\""}, "RowDefault"]}}, <<omitted output>> That TemplateBox is strange because Row should have translated into RowBox. Let us force it: kubaExport[x_] := ExportString[ ToBoxes@x /. TemplateBox[a_, "RowDefault"] :> RowBox[a] // ... 4 Unfortunately, I have only a Linux and a Mac combination here to try but maybe I can give some hints. First, you should setup your systems in your local network so you can use ssh without password. Then you should carefully study Preferences->Parallel->Remove Kernels->Custom launch command. This things is likely to need some adjustment. On my Linux machine ... 4 You can do : alist = ConstantArray["", {20, 20}]; Dynamic@Panel[ Grid[alist, Background -> LightBlue, Spacings -> {1, 1}, ItemSize -> {0, 0}, Alignment -> {Center, Center}], ImageSize -> {780, 480}, Background -> LightBlue] alist[[1, 2]] = 10; alist[[3]] = ConstantArray[3.14, {20}]; alist[[4, 2]] = 2.71; alist[[4, 3]] = ... 4 another way Grid[{ {Item["life alerts",Frame->True, Background -> Green,Alignment -> Left], SpanFromLeft}, {Item["Alert", Frame -> True], Item["% Life",Frame->True],Item["On day",Frame-> True]}, {"L1", 98, .52}, {"L2", 97, .77}, {"L3", 95, 1.27} }, Alignment -> {Center}, Frame -> True] This reference here ... 4 Here's one way to get random integers Partition[RandomSample[Range[16]], 4] This gets the first 16 integers in random order and formats them in a 4 by 4 block. You can change the "16" to 400 and the "4" to 20 and get a larger matrix of such values. 4 The Grid is the reason why it does not work! Try this for multiple sheets x = RandomReal[1, {5, 5}]; y = RandomInteger[{-10, 10}, {5, 5}]; Export[$UserBaseDirectory <> "\\file.xlsx", {"Real" -> y,"Integer" -> y}] In your case m=Table[i - j, {i, 3}, {j, 4}]; Export[\$UserBaseDirectory <> "\\file.xlsx","MySheet" -> m]

4

If you set ImageSizeMultipliers -> 1 then the graphics will not be downsized when appear inside list-like constructs: Style[ Grid[{{200!}, {MatrixPlot@IdentityMatrix@100}}, ItemSize -> Automatic], ImageSizeMultipliers -> 1] Alternatively, Grid[{{200!}, {MatrixPlot@IdentityMatrix@100}}, ItemSize -> Automatic, BaseStyle -> ...

3

In an HTML file, the appearance (and size) of elements is largely controlled by CSS properties and files, and by the users' browsers, which can choose to override the appearance (and the content, too). Mathematica exports the contents of a grid as an HTML table: <table class='Output'> <tr style='vertical-align: baseline;'> <td ...

3

This is something of a hack because I had to adjust the Dashing parameters by eye, but maybe it will give you an idea you can chew on. t = Table[x, {10}, {10}]; Grid[t, Dividers -> {{{{True, False}}, {-1 -> False, -3 -> False, 1 -> False}}, {{{Dashing[{170., 100.}], False}}, {-1 -> False, 1 -> False}}}]

3

If you want to style a grid it is better IMO to do this with Grid options and keep content and styling separate: Grid[content, options(styling)]. Wrapping data elements in Item is (manually) inefficient and soon becomes impractical as the size of the data grows. It is also inefficient/impractical to do this if you are generating data dynamically in some way. ...

Only top voted, non community-wiki answers of a minimum length are eligible