graphics - 在 Mathematica 中排列和显示网格的各个部分

标签 graphics grid wolfram-mathematica

为了快速找到我的数据的位置,我显示了一个表格,其中包含我的变量名称以及每个变量的信息。

因为我有很多列(变量),所以我将它的 block 复制并粘贴到一个单元格中,以便将它们全部显示在一个屏幕上。

我想对此进行编码,这样我就可以输入几个要提取的行范围,并在适合屏幕区域的网格上有效地显示一些内容?我还没有很好地同时显示 2 个网格。

如果上面我没有正确表达我的问题,这里有一个简单的例子:

如果 laList 的输出是我们必须处理的,我如何将蓝色部分移到粉红色部分的一侧?

co1    = Range[6];
co2    = Range[11, 16];
co3    = {"A", "B", "C", "D", "E", "F"};

laList = Join[{co1}, {co2}, {co3}] // Transpose;

laListGraph = Grid[laList,
Dividers -> All,
Alignment -> {Left, Center},
ItemSize -> Automatic,
ItemStyle -> Directive[FontSize -> 14, Black, Italic, Bold],
Spacings -> {2, 1},
 Background -> {None, None, {
     {{1, 3}, {1, 3}} -> LightRed,
     {{4, 6}, {1, 3}} -> LightBlue
   } } ]

最佳答案

编辑:

再想一想,我之前的内容不是您想要的...您希望它显示为列,但后半行拆分并显示在第一行旁边。下面的代码应该做到这一点。让我知道这是否是您的想法...

(Grid[#1, Dividers -> All, Alignment -> {Left, Center}, 
     ItemSize -> Automatic, 
     ItemStyle -> Directive[FontSize -> 14, Black, Italic, Bold], 
     Spacings -> {2, 1}, 
     Background -> {None, 
       None, {{1, 3}, {1, 3}} -> #2}] &) @@@ {{laList[[;; 3, All]], 
    LightRed}, {laList[[4 ;;, All]], LightBlue}} // Row

enter image description here

关于graphics - 在 Mathematica 中排列和显示网格的各个部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6133617/

相关文章:

android - 模拟车速表

delphi - 如何将位图附加到AggPas图像?

python-3.x - python griddata : "builtins.IndexError: index 0 is out of bounds for axis 0 with size 0" 错误

google-maps - 在 map 上显示 100k+ 点的最佳方式

python - PYQT Graphics 查看图像的像素值

javascript - ExtJS的XmlReader字段映射

python - Python 中的 2D 网格数据可视化

wolfram-mathematica - Mathematica - 有选择地收集树中的节点

wolfram-mathematica - 为什么默认行为像这样?

wolfram-mathematica - 在 Manipulate 内绘制 NDSolve