Tag Info

New answers tagged

4

I don't understand the intermediate output that you want as you did not give it in Dataset form, but I believe the grouping you want can be done with this: ds = dataset2[GroupBy[{#b &, #a &}], All, All, Extract["c"]]; ds // Normal <|"x" -> <|1 -> {1}, 2 -> {4}|>, "y" -> <|1 -> {2, 7}|>, "z" -> <|1 -> {7}, 2 ...


4

I think the problem is that SpanFromLeft match the dimensions of the first cell in the row (which is "Test\nSim\nParams"). the first cell is bigger than the others in the same levels. you may try some thing like this: Grid[{ {"", SpanFromLeft, "simple\nmodel", "improved\nmodel"}, {"Test ", "param1 =", 1, SpanFromLeft}, {"Sim\nParams", "param2 =", ...


7

Here is another solution using V10 functionalities: region = ImplicitRegion[y <= 3/10 x + 18 && y > x^2/8, {{x, -15, 18}, {y, -5, 25}}]; lis = Tuples[{Range[-15, 18], Range[-5, 25]}]; We create a RegionMemberFunction rm = RegionMember[region]; Now we select from lis the points that are in the region: in = Select[lis, rm]; Length @ in ...


7

eqn = y <= 3/10 x + 18 && y > x^2/8; sol = Reduce[eqn, {x, y}, Integers]; Length @ sol (* 286 *) points = {x, y} /. {ToRules[sol]}; (* thanks: BobHanlon *) RegionPlot[eqn, {x, -15, 18}, {y, -5, 25}, GridLines -> {Range[-15, 18], Range[-5, 25]}, PlotStyle -> Directive[{Opacity[0.5], Red}], Epilog -> ...


8

You can do : p = ImplicitRegion[y <= 3/10 x + 18 && y > x^2/8, {x, y}] points = Reduce[Element[{x, y}, p], {x, y}, Integers] pp = Cases[points, x == xx_ && y == yy_ -> {xx, yy}] pp // Length (* 286 *) Show[RegionPlot[p], ListPlot[pp]]


1

If you're OK with splitted Graphics, then here is my hack. It looks fine as long as you just concern about the appearance. Example data: dots = Graphics[{Pink, Disk[]}, ImageSize -> #] & /@ RandomSample[{10, 50, 100, 150, 200}]; data = {{"Angel Falls", "17.7 m", "0.82", "9.2"}, {"Bridalveil Fall", "6.9 m", "0.94", ...


0

Would it be acceptable for you to combine the grid and the button using Row? In[129]:= Framed[Row[{Grid[Table[ConstantArray[1, 5], {20}], Frame ->All], Spacer[2],Button["", 0;, ImageSize -> {30, 315}]}], FrameMargins -> 0] This may give you more flexibility in layout options.



Top 50 recent answers are included