Name for board/table with numbers increasing from central region - numbers

I have a "board" which is divided into N regions.
Region 1 occupies the 4 central cells of the board. Each further region contains all cells that are horizontally, vertically or diagonally adjacent to cells of the previous region, and do not belong to any of the previous regions.
For example, when N = 4, here is how the regions look:
44444444
43333334
43222234
43211234
43211234
43222234
43333334
44444444
Is there a name for a board/table which is laid out like this?

Related

equal heights for different labels in one row

I have 3 labels in a row they may have different number of words so each one may have different number of lines. I want at the end the height of views become the same. what should I do?
You want to use the Equal Heights constraint among your 3 labels. Below is an example. I have 3 labels in the same view, with the "lines" property of each label set to 0. Each has a top, leading, and width constraint applied (width = 100). So each label automatically grows taller as more text is added to them.
Now simply select all three labels and apply the Equal Heights constraint. Now two of the labels grow in height to match the third label. Now adding even more text to the label that has the most text will cause the other two labels to match its growing height. You can prove this directly within Interface Builder.

Tabluea bubble in bubble chart

I would like to make a chart showing assessment scores by gender. I would like one bubble to show the % of total students for each tick on the x-axis (call this class number). Next, I want the inner bubble to fill the first bubble based on the % of total passing grades. I also want to break it down by gender. The following is an illustration of what I am looking for:
There will be 2 bubbles per x-axis value (one for males and one for females). If the proportion of passing grades for a class is greater than it's proportion of students, then the outer bubble will be larger than the inner bubble and the colors will invert (I suppose opacity will work too).
If a bubble-in-bubble is not possible, what other chart types would you recommend? Just side-by-side bar-in-bar?
I guess we cannot have nested bubbles in Tableau.

how to find out the number of cells that are common in segmented image and reference image in matlab

I done segmentation of the breast cancer cells with 2 algorithms.the next step is to evaluate the 2 algorithms using sensitivity and positive prediction value.so i count both the no.of cells segmented image and reference with 49 and 27 cells respectively.next i have to find out the no.of cells that are present in reference image and segmented image,no.of cells that are present in reference but not in segmented image and no.of cells that are not in reference but present in segmented image.both the images are gray scale.
The issue here is how to give cells identity that will be consistent between different segmentation methods. With your segmentation result, I suppose you can calculate geometric center for each cell in both cases. Starting from reference image, if you're looking for the same cell in the segmented case, search within a certain distance ( e.g 1/2 of a cell's maximum length ) of each cell's geometric center and see if there's any cell in the segmented case whose geometric center falls within this range. Then you have your count. It'd be better if you post your codes here so answers can be more specific.

Putting space between bars using bar function

I am try to plot 16 bars, 8 of these belong to one group. I want to give this group the red color, the other 8 belong to another group which is given the blue color. I would like to arrange the bar in pairs, each pair containing one from the red group and one from the green group. I have tried the following:
bar(num1,info(1:2:end);
bar(num2, info(2:2:end);
in which info contains 16 values I want to plot, num1=1:2:numel(info) and num2=2:2:numel(info). If I do it this way, all the bars are placed adjacent to their neighbors and there are no gaps between bars. Ideally, to improve visualization, there should be space in between pairs but no space within a pair. For instance, bar1bar2 <space> bar3bar4 <space> bar5bar6<space>...
Could someone help me with this spacing issue? Thank you so much!
See the docs for bar. You can reshape info to 2xN (instead of its current shape 1x2N) and then use a single bar command to plot the 2 series, and it will take care of the spacing.
See this image from the docs:
If you want to keep doing it your way, you could just tweak num1 and num2:
N = numel(info) / 2;
num1 = (1:N) * 3;
num2 = (1:N) * 3 + 1;

How to adjust multiple rows of labels in Xcode so that they occupy around 70 % of screen height?

I'm trying to build an app that has just a single portrait oriented view. There is a title on top and results label at the bottom of the view, these are locked to top and bottom and center, no problem here.
Now this is the tricky part. I have 9 rows of labels, most single row but couple span out to 2 rows. I want them to spread out evenly between the title and the result-label.
I lock the first label to top-left, lock the leading edges and then set equal vertical distance constraints between the labels. Otherwise ok but the last labels on 3.5 inch display overrun my results -label.
So I adjust either the fontsize or make vertical distance between labels smaller or both. 3.5 inch problem fixed but now there is a big empty gap between the last label and result. On iPhone 6 its really ugly.
I have tried all sorts of methods but can't just get this working.
So basically: how do I reserve 10 % of view height from top and 20 % from bottom and tell Xcode to use the rest 70 % (and all of it) for my 9 rows of label, evenly?
Thanks for help!
Would have posted an image but no rank for such things...
If I understand you right, you need several flexible spaces that will all be the same size. One space in-between each of the labels.
Create UIViews to put between each label, set them all to have equal widths or heights and anchor each one to the views it is supposed to sit between.
I got this idea from another SO question: Springs in Auto Layout: Distribute views evenly, with constraints, in Xcode 5