Skip to main content
23 votes
Accepted

How to write a drag-n-drop reorderable gui?

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 ...
Lukas Lang's user avatar
  • 34.2k
20 votes
Accepted

Column makes fonts smaller

There is an option for Column or Grid to avoid this: AllowScriptLevelChange ...
user45937's user avatar
  • 1,311
19 votes

How to write a drag-n-drop reorderable gui?

I once approached this. I never finished it so let me know if you face any issues: ResourceFunction["GitHubInstall"]["kubapod", "mgui"] << MGUI` And here ...
Kuba's user avatar
  • 137k
18 votes
Accepted

How to properly use FrameLabel with the new PlotLayout feature?

You can use yet-to-be-documented options "ColumnLabels" and "RowLabels" as ...
kglr's user avatar
  • 399k
16 votes
Accepted

How to create dataset with ordered and hierarchically-grouped rows?

Update - Version 11 In version 11, The Dataset visualizer handles triply-nested associations quite nicely: ...
WReach's user avatar
  • 69.1k
16 votes

How to create a multi-graphics plot (i.e. the decomposition of phase plane portrait) with well-organized structure?

...
ubpdqn's user avatar
  • 62.8k
16 votes
Accepted

When is a symbol a Symbol? Is there an easy Mathematica way to test if an object is a symbol sort of like a SymbolQ?

I'd probably use x_Symbol in a function argument to control evaluation. Otherwise, one might do the following (thanks to @Leonid for pointing out an oversight). If ...
Michael E2's user avatar
  • 239k
14 votes
Accepted

Exporting an image so that the PlotRange has a fixed size in the output

I don't know if the following addresses all of your issues, but there are 2 things I would try: ImageSize -> Automatic -> size This option sets the plot ...
Carl Woll's user avatar
  • 131k
14 votes
Accepted

How to merge two lists with different dimensions

You can use Transpose + PadRight: Transpose @ PadRight[{a,b}, Automatic, Null] {{a1, b1}...
Carl Woll's user avatar
  • 131k
13 votes

Display hexagon grid to visualize Langton's ant

Oh, what a fun topic to play with. Thank you for showing it to me. If you are interested, here is a simple implementation of the colored Langton Ant that does not generate a grid in the beginning but ...
Henrik Schumacher's user avatar
12 votes
Accepted

How to create a multi-graphics plot (i.e. the decomposition of phase plane portrait) with well-organized structure?

Using same PlotRange would be a good start. For example ...
Sumit's user avatar
  • 16k
12 votes

TableSpacing oddity

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 ...
Alexey Popkov's user avatar
12 votes

When is a symbol a Symbol? Is there an easy Mathematica way to test if an object is a symbol sort of like a SymbolQ?

How about: SymbolQ[_Symbol] = True SymbolQ[_] = False ?
John Doty's user avatar
  • 13.8k
12 votes
Accepted

An odd Grid style

ItemSize >> Properties and Relations: "Controls and graphics will by default expand to fit the available area." So we can use a graphics object as ...
kglr's user avatar
  • 399k
11 votes

Column makes fonts smaller

Another approach is to set AllowScriptLevelChange -> False via GridBoxOptions: ...
Alexey Popkov's user avatar
11 votes

Display hexagon grid to visualize Langton's ant

Here's a quick way to create a hex grid by exploiting ResourceFunction["HextileBins"] so you don't need to think too hard about placement: ...
flinty's user avatar
  • 25.6k
11 votes
Accepted

What is "size"?

There is no universal unit in Mathematica. You will need to check the documentation for each size setting. Commonly used units include: "Points" usually correspond to pixels on the screen (...
Szabolcs's user avatar
  • 236k
11 votes
Accepted

How can I add a vertical spacing in a `CheckboxBar`?

You can wrap CheckboxBar with Style using the option DefaultOptions to modify the ...
kglr's user avatar
  • 399k
10 votes
Accepted

Grid Centring around Divider

Update 2: A function that takes a list of cell indices and a Grid object to interactively adjust the alignments and paste the input form of the selected ...
kglr's user avatar
  • 399k
10 votes

How to Partition List into sublists so that it orders down columns when placed into a Grid instead of across rows

Grid@Flatten[Partition[list, UpTo[n]], {{2}, {1}}] $$\begin{array}{ccc} 1 & 4 & 7 \\ 2 & 5 & 8 \\ 3 & 6 & \text{} \\ \end{array}$$ ...
Syed's user avatar
  • 55.9k
9 votes

Prevent Grid from resizing images

ImageSizeMultiplers ImageSizeMultipliers is an option that specifies how much smaller to render graphics that appear within other constructs. ImageSizeMultipliers -> {u,v} specifies that ...
kglr's user avatar
  • 399k
9 votes
Accepted

Visualize Pascal's triangle with the product of the terms in the $n$th row

...
Kuba's user avatar
  • 137k
9 votes

How to make tabs aligned in Print?

Print isn't really meant to do text-processor-like formatting. It most common use it to display intermediate results where people don't care much about pretty-...
m_goldberg's user avatar
  • 108k
9 votes
Accepted

Grid with Frame->All: How to not draw frames around empty cells?

You may use Item. Grid@Map[Item[#, Frame -> All] &, Partition[Range@17, UpTo@7], {2}] Hope this helps.
Edmund's user avatar
  • 42.4k
9 votes

Display hexagon grid to visualize Langton's ant

...
chyanog's user avatar
  • 15.6k
9 votes
Accepted

How to draw a table with this style?

tables = Partition[Range @ 17, 9, 9, {1, 1}, {}] {{1, 2, 3, 4, 5, 6, 7, 8, 9}, {10, 11, 12, 13, 14, 15, 16, 17}} ...
kglr's user avatar
  • 399k
8 votes

Grid: How to assign a common legend to multiple plots?

You can use Legended (look at documentation to customize for your needs). Dummy data for illustrative purposes: ...
ubpdqn's user avatar
  • 62.8k
8 votes

program a wall in which an object can not pass

Before making a move, test if the new position is a valid position. A valid position is one where Pac-Man does not touch the walls. Mathematica has convenient functions that deal with regions, so we ...
C. E.'s user avatar
  • 70.9k
8 votes
Accepted

Using Padding and Margins with Graphics object

I think adding another frame will do what you want. Like so: ...
m_goldberg's user avatar
  • 108k
8 votes

When is a symbol a Symbol? Is there an easy Mathematica way to test if an object is a symbol sort of like a SymbolQ?

I found my answer thanks to Sjoerd Smit who referenced me to the Mathematica Function Repository. And yes it is appropriately called SymbolQ which is used like the ...
Jules Manson's user avatar
  • 2,467

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