Questions tagged [grid-layouts]

Questions about producing vertically and horizontally aligned output.

Filter by
Sorted by
Tagged with
32 votes
4 answers
19k views

What is the most elegant way to display multiple graphs with a common title?

I often seek to display two graphs, side by side, with a common label over them. There is no option for adding a label to GraphicsRow, which means, I think, that I ...
Michael Stern's user avatar
26 votes
2 answers
2k views

Schedule programing problem with integer linear programming

I know how to model this question on paper, but I don't know how doing it in Mathematica. Imagine , there is a university student who want to choose courses for this semester and he got the ...
DSaad's user avatar
  • 1,173
22 votes
2 answers
2k views

How can I create an advanced grid interface?

Working on a CDF for report creation, I miss having a nice grid interface, where I would have basic operations like being able to sort a columns by clicking on the columns head (ascending and ...
Murta's user avatar
  • 26.3k
22 votes
2 answers
2k views

How to add lines in TableForm

...
Chen Stats Yu's user avatar
21 votes
3 answers
1k views

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

Most modern GUI building libraries (e.g. cocoa) support this basic operation in tables or lists: reordering items with a mouse. For example, the drag-and-drop of items in a MacOS finder or app window: ...
user5601's user avatar
  • 3,583
21 votes
2 answers
2k views

Generating schedules/timetables in Mathematica

I've always used MS Excel to create my school schedules, and I've always been happy with the results. Is there a similar GUI way to generate schedules/timetables in Mathematica or a third-party ...
CHM's user avatar
  • 3,415
21 votes
3 answers
2k views

Build a refined grid based on intersecting line

I honestly have no idea where to begin with this problem. In summary, I have a 2D coarse grid with an intersecting line. For an easy example, let's assume it's a 4x4 grid. I wish to pass through each ...
kale's user avatar
  • 10.9k
20 votes
2 answers
5k views

Export to PDF - scaling grids of plots and text size

Sometimes I have occasion to make big grids of plots. As a toy example: ...
wxffles's user avatar
  • 14.2k
20 votes
4 answers
852 views

Grid - Item - Alignment to decimal problem

Bug introduced in 7.0 or earlier and fixed in 13.1 I've run into a Grid layout problem for which I don't know a solution. I want to specify alignment to a ...
Mr.Wizard's user avatar
  • 272k
18 votes
4 answers
1k views

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?

Yes I know there is no built-in native function called SymbolQ (but JavaScript does). However, could one be simulated to work for most cases? I often rely on ...
Jules Manson's user avatar
  • 2,457
18 votes
1 answer
865 views

Grid cuts my images

Bug introduced in V9.0 or earlier and persisting through V11.2 pic2 = ImageResize[ ImageCrop@Rasterize@Graphics@Disk[], {Automatic, 40}] ...
Kuba's user avatar
  • 137k
16 votes
1 answer
750 views

Grid layout problems: different sizes when rendering on Mac and Windows

From the documentation for ItemSize: {w,h} make all items the specified width and height and In Grid, w is measured in ems, and h in line heights. This ...
Mike Honeychurch's user avatar
15 votes
3 answers
844 views

Display hexagon grid to visualize Langton's ant

I am looking to recreate the following image from this reference as using Mathematica's Polygon documentation under "Applications" as a starting point. I want to eventually use Mathematica ...
Connor Fuhrman's user avatar
15 votes
2 answers
3k views

How do I display imported images at actual size?

I know that this is an extremely basic question, but I am having a lot of trouble finding the answer in the documentation. When I import an image (for example, ...
Andrew's user avatar
  • 10.6k
15 votes
5 answers
1k views

The mysterious gap inside Grid

There's this gap inside Grid which I cannot seem to remove. Perhaps someone knows how. ...
Jonie's user avatar
  • 1,199
15 votes
1 answer
589 views

Combining BarChart and Grid - IPCC style

I would like to combine a plot with a table. Something like this famous plot/table from IPCC: So after reading Combining graphics & lists / tables I tried an approach using ...
gogoolplex's user avatar
14 votes
2 answers
392 views

Column makes fonts smaller

When you use Column (or Grid) a previously styled element with explicit font-size setting appears much smaller. Here is an ...
halirutan's user avatar
  • 113k
14 votes
1 answer
430 views

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

The (toy-example) dataset plots consists of 12 rows, the first two of which are shown below: I want to arrange the plots shown in the ...
kjo's user avatar
  • 11.7k
14 votes
3 answers
656 views

Grid - problem with ItemSize being ignored

Bug introduced in 7.0 or earlier and persisting through 11.0 or later. Fixed in 13.0.0 or earlier I have run into another problem with Grid today. An explicitly ...
Mr.Wizard's user avatar
  • 272k
14 votes
2 answers
421 views

Is there a way to exert finer control Dataset Cell Coloration Like in Grid?

In Grid one can control the foreground and background color of specific cells, rows, and columns, whether initially or via computation. Although Dataset seems to use Grid intrinsically, from existing ...
Stuart Poss's user avatar
  • 1,883
13 votes
2 answers
505 views

How to properly use FrameLabel with the new PlotLayout feature?

Behold! MMA 13 brought us closer to getting publication-ready plots. I wonder if we can solve this one once and for all with a nifty & modern wolfram syntax. I'd like to have 4 plots with each y-...
Ranza's user avatar
  • 1,205
13 votes
1 answer
282 views

Possible to draw an Item in a Grid with only 3 sides of a Frame?

I'm trying to draw a Grid of characters where some of the characters have Frame lines on 3 sides. For example: ...
sblom's user avatar
  • 6,453
13 votes
1 answer
231 views

TableSpacing oddity

Bug introduced in 8.0 or earlier and persisting through 12.0 TableForm[Partition[Range@9, 3], TableSpacing -> {0, 0.5}] ...
Mark Adler's user avatar
  • 4,949
13 votes
1 answer
427 views

How to create (Header + Main area + Settings pane) notebook layout

cross-posted in community.wolfram.com The goal is something like in the picture below. Basic? I dare you to try to implement it in a manageable, scalable and flexible way. Requirements: The goal ...
Kuba's user avatar
  • 137k
12 votes
3 answers
4k views

TableForm with a title

My question is rather simple. I want to put a title into a table. For example, consider a list with depth two and a title ...
Sungmin's user avatar
  • 2,295
12 votes
4 answers
1k views

Combining histograms with a scatter plot

I'm trying to combine graphics using Grid such that I have a ListPlot[] in the middle and a histogram on the top and right axes. ...
mikemtnbikes's user avatar
12 votes
4 answers
2k views

Grid - sizing and spacing problems with spanning cells

I am trying to set up a Grid with cells that span two rows and are centered on those rows, but I am having troubles with the sizing and, therefore, spacing of the ...
Mr.Wizard's user avatar
  • 272k
12 votes
2 answers
2k views

How to set row height in Grid?

I always thought that Grid (and the underlying GridBox) and the general handling of tabular objects is a bit weird in ...
István Zachar's user avatar
12 votes
1 answer
381 views

Arranging elements in a Grid by drag&drop

I have some elements in a Grid. I want to change their positions within that Grid. Can I swap their positions just by dragging ...
Jennifer's user avatar
  • 953
11 votes
3 answers
533 views

How to make Excel-like data bars?

I would like to make a grid where each cell background is partially filled according to the numerical value being represented (on a scale from 0 to 1). Similar functionality to the one requested in ...
dabd's user avatar
  • 839
11 votes
2 answers
364 views

How to make a Slash header in Grid?

Here is an example, ...
matheorem's user avatar
  • 17.1k
10 votes
2 answers
624 views

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

Background I am trying to create a three-graphics plot using the command GraphicsGrid[] to show the decomposition of the phase plane portrait; unfortunately, the ...
Liang.X's user avatar
  • 103
10 votes
2 answers
588 views

An odd Grid style

Consider the following grid n = 10; Grid[{{"Matrix", SpanFromLeft}, RandomInteger[n, n], RandomInteger[n, n]}, Frame -> All, Alignment -> Center] ...
sam wolfe's user avatar
  • 4,693
10 votes
2 answers
611 views

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

I am writing a document that involves a table of plots, of an array of quantities ($f$ and $g$, say) against an array of variables ($x$ and $y$, say), and which I would like to present in the ...
Emilio Pisanty's user avatar
10 votes
1 answer
386 views

How to merge two lists with different dimensions

I have two list, just like a={a1,a2,a3,a4}; b={b1,b2,b3,b4,b5}; I want merge them and save to excel, as they have different dimention, so I want it have the ...
zongxian's user avatar
  • 901
10 votes
1 answer
964 views

Group dataset on two keys (GroupBy)

I would like to group the elements of row c of the following dataset according to the values in the columns a and b. That is Go from here To here And then I would like to print this on a grid, ...
sjdh's user avatar
  • 7,757
9 votes
3 answers
296 views

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

I have an example here from the solution of @krasten 7. In this I would like some vertical spacing between the checkboxes. Any ideas? ...
Rupesh's user avatar
  • 887
9 votes
2 answers
1k views

Grid ItemSize is smaller than expected

If I execute MatrixPlot@IdentityMatrix@100, the result is a good size. However, if I evaluate ...
tba's user avatar
  • 585
9 votes
4 answers
2k views

Row and Column Headings for a Grid

It would be useful for me if I could write: Grid[{{a, b}, {c, d}, {e, f}}, GridHeadings -> {{"r1", "r2", "r3"}, {"c1", "c2"}}] just like ...
eldo's user avatar
  • 69.5k
9 votes
4 answers
507 views

Grid changes FrameTicksStyle font size

I have a contour plot that I'm trying to organize into a grid using Grid. But Grid changes the ...
Max's user avatar
  • 1,050
8 votes
3 answers
852 views

Inconsistent image sizing with Grid and Row?

Can anyone explain why Row and Grid don't size the image correctly and consistently to 300 ...
Jagra's user avatar
  • 14.3k
8 votes
3 answers
3k views

Part of an Image cut/lost when exported to EPS file

When making .EPS image files for publication, I tried to assemble several Graphics by Grid. For example, suppose I have: ...
Harry's user avatar
  • 2,715
8 votes
3 answers
424 views

Grid without lines, but with dots

I want to build a grid to look like the top-left table shown below, but without an outside frame. Here is what I've tried to do: ...
Nakilon's user avatar
  • 552
8 votes
3 answers
3k views

Prevent Grid from resizing images

Aligning my images in Grid causes one of them to become smaller, despite specifying each of their sizes with ImageSize: ...
user8454's user avatar
  • 353
8 votes
1 answer
4k views

Changing the background color of one element in a Grid

Consider the following code: Grid[Table[x, {4}, {7}], Background -> {4 -> LightRed}] This highlights column 4: ...
tjm167us's user avatar
  • 993
8 votes
3 answers
796 views

How to add rows to a Grid in front end?

I created a grid g1 with Grid[] and then a separate grid g2. ...
user13253's user avatar
  • 8,666
8 votes
1 answer
999 views

Control line wrapping within a Grid cell

I'm trying to display a number tables of data in my document which have column headings that are longer than the cell width for those columns so they need to wrap within the grid cell. I have no ...
CrustyNoodle's user avatar
8 votes
2 answers
1k views

Interactively select a row/column of a Grid

I need a simple way to display tabular data (preferably with Grid) and also be able to select a row or column of the table. I've tried different approaches, but I ...
István Zachar's user avatar
8 votes
3 answers
693 views

How to scale the size of Pane to make it fit a Grid element?

I am wanting to make a Pane scale to fit (if Spacings are zero) a Grid element. ...
Mike Honeychurch's user avatar
8 votes
2 answers
2k views

GraphicsGrid of plots with legends

I use GraphicsGrid to get a table of contour plots, where each of the plots is using its own scaling, so I want to include the bar legend for each of the plots. But ...
Oleg Soloviev's user avatar

1
2 3 4 5
8