@@ -248,14 +248,14 @@ Generate a figure with the cells area and perimeter. All the plots generated by

The `scale_bar_length` parameter specifies what should be the length (in physical units) of the scale bar added to the bottom left of the plot. By default it is 10. The output arguments `[ hf, ax1, ax2 ]` are respectfully the handles to the figure created, to the top axes and to the bottom axes.

Generate a figure with the local plane orientation for each cell. This plane is the oblique plane that is tangent, or as close as possible, to the points on the cell boundary. Its orientation is given as the **3 Euler angles** in the [ZX'Z'' convention](https://en.wikipedia.org/wiki/Euler_angles#Chained_rotations_equivalence).

...

...

@@ -264,54 +264,54 @@ Generate a figure with the local plane orientation for each cell. This plane is

- The third one , `gamma` measures the cell main orientation in the cell plane (bottom panel). Because the cell plane was rotated a first time by `alpha`, this angle does not give a result immediately usable.

The ellipses are plotted in 3D, with the semi-major axis identified by a line. They are coloured by their orientation (projected on the XY plane). The output arguments are respectively `hf` the handle to the figure created and `he` the list of handles to the ellipse and lines created.

The ellipses are plotted in 3D, with the semi-major axis identified by a line. They are coloured by their orientation (projected on the XY plane). The output arguments are respectively `hf` the handle to the figure created and the two axes.

Generate a figure with the local curvature for a collection of epicells. The output arguments are respectively `hf` the handle to the figure created and the 3 handles to the axes created from top to bottom.

DeProj computes the [mean curvature](https://en.wikipedia.org/wiki/Mean_curvature), the [Gaussian curvature](https://en.wikipedia.org/wiki/Gaussian_curvature) and the [principle curvatures](https://en.wikipedia.org/wiki/Principal_curvature), but this plot only includes the mean curvature and the principal curvatures (they have the same units). See the description of these properties in the [documentation on properties](DeProjProperties.md).

Generate a figure with the error on uncorrected cells area and perimeter.

#### `add_plot_id`

#### `add_plot_ids`

`hts = add_plot_id( obj, ax )`

`hts = add_plot_ids( obj, ax )`

Add the epicell ids to the specified plot axes `ax`.

```matlab

>>[hf,ax1,ax2]=dpr.plot_sizes;

>>dpr.add_plot_id(ax1);

>>dpr.add_plot_ids(ax1);

```

![PlotSizeWithIDs](static/PlotSizeWithIDs.png)

...

...

@@ -320,21 +320,35 @@ Add the epicell ids to the specified plot axes `ax`.

These secondary methods are used by the methods described above. Feel free to reuse them in your post-analysis pipelines.

#### `add_plot_variable`

#### `plot_values_contour`

`hts = add_plot_variable( obj, values, ax )`

`hts = plot_values_contour( obj, values, ax )`

Plots the cell boundaries as patches, colored by the specified values.

Plot the tissue with the cell exact contours, colored by the specified values.

This method generates the colored panels of the figures above. It takes all the cell boundaries, plot each of them as a patch, and color them according to the values in the `values` array. The 3rd input arguments `ax` is not optional and specifies the handle of the axes to draw the cells in. The output argument `hts` is the list of handles to the patch objects created.

This method generates the colored panels of the figures above. It takes all the cell boundaries, plot each of them as a patch, and color them according to the values in the `values` array. If you leave it empty or specify a color string (`'w'`, `'k'`, `'r'`, ..) the cell faces will be transparent and the cell borders will be painted with the specified color.

All the `add_plot_*` methods derive from this one.

The 3rd input arguments `ax` is not optional and specifies the handle of the axes to draw the cells in.

#### `add_ellipse_variable`

The output argument `hts` is the list of handles to the patch object created.

This method does the same thing that the one described above, but plot the cells as their corresponding 2D ellipse. The third argument required is `camp` the colormap to use for colouring.

`hts = plot_values_ellipse( obj, values, ax )`

Plot the tissue with cells as ellipses, colored by the specified values.This method does the same thing that the one described above, but plot the cells as their corresponding 2D ellipse, with one line for the major axis.

#### `plot_values_junction`

`hts = plot_values_junction( obj, values, ax )`

Plot the tissue with the cell contour approximated by the junctions, colored by the specified values. Again this method is a 3rd variation of the top one, this time offering an approximation of the cell boundaries via their junctions. This will reveal useful when trying to plot and interact with a large number of cells (>10<sup>6</sup>).

#### `plot_text`

` hts = plot_text( obj, texts, ax )`

Plot text in the cell array `texts` at the cell centers. Contrary to the plotting functions above, we could not optimize this function, and it will be slow for large number of cells.

How many neighbours have a cell. Note that for cells on the border of the tissue, we try to deal with border effects. For a cell at the border, we count the number of neighbours including all cells, even the ones not drawn because they are cropped by the image borders.

### `area`

The area of the apical surface of the cell, delimeted by its boundary. This value reports the 3D area, of the de-projected cell on the tissue surface. Units are physical units; if you used a pixel size in µm, the area will be in µm².

...

...

@@ -298,7 +303,7 @@ We can use this junction graph to plot a topological representation of the segme

% Get the junction graph (run the RunExample.m file first)

g=dpr.junction_graph;

% Display the junction graph. We use the graph builtin plot method.

% Display the junction graph. We use the graph builtin plot method. We just use a 2D plot.

>>plot(g,...

'XData',g.Nodes.Centroid(:,1),...

'YData',g.Nodes.Centroid(:,2),...

...

...

@@ -308,6 +313,10 @@ g = dpr.junction_graph;

'Marker','o',...

'MarkerSize',4,...

'NodeColor','r')

% Another simpler solution is to directly use a special deproj plotting method.

% This one plots the junction graph in 3D, with white edges. Uncomment it to try.