35

This code is not generalized. It has been written for a specific problem but you can take it and should be able to make it a more general function -- add flexibility (e.g. add grid options) or tailor it to your needs. ClearAll[frozenPaneGrid]; Options[frozenPaneGrid] = {"RowLabelSort" -> False}; frozenPaneGrid[tl_, tr_, bl_, br_, OptionsPattern[]] := ...


28

If you can put your schedule into a list like this: schedule = { {"Lundi", "09:30", 1, "Inorg 1", "N-515", Lighter[Orange, 0.5]}, {"Lundi", "10:30", 1, "Physique 4", "N-515", Lighter[Cyan, 0.5]}, {"Mardi", "9:30", 2, "Macromol 2", "G-815", Lighter[Green, 0.3]}, {"Mardi", "14:30", 1, "Inorg 1", "répet N-515", Lighter[Orange, 0.5]}, {"Mecredi"...


28

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"]


22

You can also use the HorizontalGauge function introduced in version 9. For example: bar = HorizontalGauge[#, {0, 100}, GaugeMarkers -> "ScaleRange", GaugeStyle -> {Darker@Green, GrayLevel[0.95]}, TicksStyle -> None, GaugeFrameSize -> None, ScalePadding -> 0, ImageSize -> 200, AspectRatio -> 1/5, LabelStyle -> None, ...


22

I liked rm-rf's gauged solution so much that I made an interactive version: bar[n_] := DynamicModule[{x = n}, HorizontalGauge[Dynamic[x], {0, 100}, GaugeMarkers -> "ScaleRange", GaugeStyle -> {Darker@Green, GrayLevel[0.95]}, TicksStyle -> None, GaugeFrameSize -> None, ScalePadding -> 0, ImageSize -> 200, AspectRatio -> 1/5, ...


20

There is an option for Column or Grid to avoid this: AllowScriptLevelChange cell = Framed[Style[(2*x^(3/2))/3, FontSize -> 14], FrameMargins -> 10, FrameStyle -> {AbsoluteThickness[1], LightGray}, RoundingRadius -> 3]; {cell, Column[{cell}, AllowScriptLevelChange -> False]} UPDATE Honestly, I don't know why Panel doesn't respect ...


19

Here is an ILP approach. It can be modified to alter requirements e.g. if a course has a lab, must take neither or both, maybe insist on at most one instructor with the lowest rating, at most two classes before 9 AM, have courses that meet on multiple days, etc. I entered it all by hand although clearly one could use Import and further processing. courses =...


18

Here is a very crude first implementation (code at the bottom): (note that the updated version is called as `dragDropList[Dynamic@l) Some notes: The black box serves both as insertion marker and as spacer to move the other items out of the way - obviously, it will need some better styling I'm not sure what the best size for the insertion point is - one ...


17

How about this? Grid[{{1, 2, 3}, {4, Item[5, Frame -> {{True, True}, {True, False}}], 6}}]


17

Something like this? Grid[Map[Graphics[{GrayLevel[0.8], Rectangle[Scaled[{0, 0}], Scaled[{#, 1}]], Black, Style[Text[#], Large]}, AspectRatio -> 0.2] &, RandomReal[{0, 1}, {4, 3}], {2}], Frame -> All] Of course you can place the Text and style to taste. Here is a slightly more complex version: Grid[Map[Graphics[{GrayLevel[0.8], ...


17

You might want to try something like this: Grid[ Transpose@ Insert[ Transpose@ Insert[ Table[ aaa, {ab, {{1, 1}, {1, 2}, {1, 3}, {2, 3}}}, {\[Phi], {0, \[Pi]/ 4, \[Pi]/2, (3 \[Pi])/4, \[Pi]}}], {0, \[Pi]/4, \[Pi]/ 2, (3 \[Pi])/4, \[Pi]}, 1 ], { Graphics[{ Line[{{0, 1}, {2, 0}}], Text[Style["...


16

Programmatically I would use: img = ExampleData[{"TestImage", "Lena"}]; Image[img, Magnification -> 1] Manually you can right-click on the image and select Actual Size. Edit: Although not as robust as what follows a simple solution to the resizing that takes place in Row, Grid, etc. is to wrap the Image or Graphics in Pane. Within an Image there is ...


15

Here's my go at it. This tells you if two line segments intersect (unless they lie on the same line, in which case it fails horribly): ClearAll[segmentsIntersect]; segmentsIntersect[{a_, b_}, {p_, q_}] := Module[{s, t, soln}, soln = NSolve[a + t (b - a) == p + s (q - p), {s, t}]; If[Length@soln == 0, False, (0 <= s <= 1 && 0 <= t ...


15

Update - Version 11 In version 11, The Dataset visualizer handles triply-nested associations quite nicely: plots[ GroupBy[{#color&, #suit&, #elf& -> (#plot&)}] /* KeySortBy[<|"Red"->1, "Black"->2|>] , KeySort , KeySort , First ] Original Response The Dataset visualizer does not presently (v10.4.1) support a nice layout ...


15

f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0}; ss[t_] = y[t] /. NDSolve[f1, y, {t, 0, 10}][[1]] fun[p_] := Show[Plot[ss'[t - 1], {t, 1, 2 Pi + 1}, PlotRange -> Full], ParametricPlot[{ss[t], ss'[t]}, {t, 0, 2 Pi}], ParametricPlot[{ss[t - 2], -t}, {t, 2, 2 Pi + 2}] , PlotRange -> {{-1, 6}, {-8, 1}}, AxesOrigin -...


13

Why this happens? The reason for this behaviour is that Mathematica works with two kinds of units: plot coordinates---the same thing you see on the axes offset coordinates---these are in printer's points Plot coordinates scale with the figure: if you print the figure (or export to PDF) at twice the size, objects specified on plot coordinates double in ...


13

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 ...


13

Labeled[TableForm[list], title, Top] Panel[TableForm[list], title, Top, Appearance -> "Frameless"] Note: To remove quotes in title you can use: Labeled[TableForm[list], Style[title, ShowStringCharacters -> False], Top] Update: Post-processing the output of Jen's method to center the label and remove the divider line: ClearAll[labelF] labelF = ...


13

You can use Transpose + PadRight: Transpose @ PadRight[{a,b}, Automatic, Null] {{a1, b1}, {a2, b2}, {a3, b3}, {a4, b4}, {Null, b5}}


12

This is my implementation using Graphics primitives and rules. Here's the final result; the implementation details and edge cases follow. 1. General approach First, we start with a single square and build up a test grid: square = Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}]; grid = Graphics[{EdgeForm[Black], FaceForm[None], Table[Transpose@First@square + ...


12

The Pane construct is quite flexible. I cannot imagine not using it with table for fluid sizes control and features. Here are your data: data={{"000000000\n111111111\n222222222","000000000"},{"000000000","000000000"}} This will fix the cell size and cut off the content if it won't fit: Grid[Map[Pane[#, ImageSize -> {80, 30}] &, data, {2}], Frame -&...


12

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}]]]


12

Using Graphics: As suggested by Mr.Wizard in comments Graphics, inconvenient as it is, is way to get the desired output: gF[txtopts_: {16, "Panel", Italic}, o_:{AspectRatio -> 1/GoldenRatio, ImageSize -> 500}] := With[{d2 = Transpose@Reverse[Prepend[Transpose[Prepend[Transpose[#], #2]], Prepend[#3, ""]]], dim = {1, 1} + Dimensions@#, prims = #...


12

I see the same with versions 8.0.4, 10.4.1 and 11.1.0 on Windows 7 x64. Only with version 5.2 the outputs are formatted identically. Let us look at the underlying box expression printed in the Notebook in each case (the following is the output from version 11.1.0): CellPrint[ExpressionCell[TableForm[Partition[Range@4, 2], TableSpacing -> {0, #}], "...


12

I once approached this. I never finished it so let me know if you face any issues: ResourceFunction["GitHubInstall"]["kubapod", "mgui"] << MGUI` And here is an example: DynamicModule[{ labels = Range[7] } , labels[[1]] = Style[1, "Section"] ; Grid[{ { "Default", "ContinuousAction", "", "ref"} , { MSorter[Dynamic@labels] , MSorter[...


11

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 -> ...


11

I can reproduce the problem described by OP in Mathematica 9.0.1 on Windows 8.1. By using FrontEnd`UndocumentedBoxInformationPacket to check the displayed Boxes' layout in the FrontEnd, I wildly guess that the cause of the problem might be hiding in the FrontEnd layout engine (of only the Windows version maybe?). If it's true, then there might be nothing we ...


11

My standard(1) work-around for this problem is to add Pane: Grid[{{Pane@image}}] Row[{"abcd", Pane@image}] Grid[{{"abcd", Pane@image}}] A default characteristic of Pane is that it still allows resizing its contents to fit the window width of the Notebook. I find this a desirable default behavior. However if clipping is preferred you can specify an ...


11

There's Backslash: Grid[Transpose@ Insert[Transpose@ Insert[Table[ aaa, {ab, {{1, 1}, {1, 2}, {1, 3}, {2, 3}}}, {ϕ, {0, π/ 4, π/2, (3 π)/4, π}}], {0, π/4, π/2, (3 π)/4, π}, 1], {Backslash["x:y", ϕ], "1:1", "1:2", "1:3", "2:3"}, 1], Frame -> All] You can use various things to control size and placement. For instance, ...


11

With Frame -> All, the automatic Spacings are weird. The automatic BaselinePosition is bad either way. It seems to be a good idea to include substitutes for as many of those options which are Automatic by default as possible: pic2 = ImageResize[ImageCrop@Rasterize@Graphics@Disk[], {Automatic, 40}]; Grid[{{pic2}}, Alignment -> {Center, Center}, ...


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