Commit c1ff1988 authored by Jean-Yves TINEVEZ's avatar Jean-Yves TINEVEZ
Browse files

Update user doc after plotting functions renaming.

parent 3a6f69f5
......@@ -239,7 +239,7 @@ dpr.to_file( 'table.xlsx' )
![ExampleExport](static/ExampleExport.png)
#### `plot_sizes`
#### `figure_cell_sizes`
`[ hf, ax1, ax2 ] = plot_sizes( obj, scale_bar_length )`
......@@ -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.
```matlab
>> dpr.plot_sizes
>> dpr.figure_cell_sizes;
```
![ExampleResults_fig1a_CellSize](static/ExampleResults_fig1a_CellSize.png)
#### `plot_fit_plane`
#### `figure_tissue_orientation`
`[ hf, ax1, ax2, ax3 ] = plot_fit_plane( obj, scale_bar_length )`
`[ hf, ax1, ax2, ax3 ] = figure_tissue_orientation( obj, scale_bar_length )`
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.
```matlab
>> dpr.plot_fit_plane
>> dpr.figure_tissue_orientation;
```
![ExampleResults_fig2_EulerAngles](static/ExampleResults_fig2_EulerAngles.png)
#### `plot_fit_ellipse`
#### `figure_cell_elongation`
`[ hf, he ] = plot_fit_ellipse( obj, scale_bar_length )`
`[ hf, ax1, ax2 ] = figure_cell_elongation( obj, scale_bar_length )`
Plot the 2D ellipses on the 3D tissue surface.
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.
```matlab
>> dpr.plot_fit_ellipse;
>> dpr.figure_cell_elongation;
```
![ExampleResults_fig3_EllipseFit](static/ExampleResults_fig3_EllipseFit.png)
<img src="static/ExampleResults_fig3_EllipseFit.png" alt="ExampleResults_fig3_EllipseFit" width="60%;" />
#### `plot_curvatures`
#### `figure_curvatures`
`[ hf, ax1, ax2, ax3 ] = plot_curvatures( obj, scale_bar_length )`
`[ hf, ax1, ax2, ax3 ] = figure_curvatures( obj, scale_bar_length )`
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).
```matlab
>> dpr.plot_curvatures;
>> dpr.figure_curvatures;
```
![ExampleResults_fig4_LocalCurvature](static/ExampleResults_fig4_LocalCurvature.png)
#### `plot_distorsions`
#### `figure_distorsions`
`[ hf, ax1, ax2 ] = plot_distorsions( obj, scale_bar_length )`
`[ hf, ax1, ax2 ] = figure_distorsions( obj, scale_bar_length )`
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.
`hts = add_ellipse_variable( obj, values, cmap, ax )`
#### `plot_values_ellipse`
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.
#### Static method `cmap_seismic`
......
......@@ -10,6 +10,7 @@ We give here the list of properties stored in the DeProj classes and their defin
* [boundary](#boundary)
* [center](#center)
* [junction_ids](#junction_ids)
* [n_neighbors](#n_neighbors)
* [area](#area)
* [perimeter](#perimeter)
* [euler_angles](#euler_angles)
......@@ -132,6 +133,10 @@ j =
<img src="static/BoundaryJunctionPlug.png" alt="BoundaryJunctionPlug" width="400" />
### `n_neighbors`
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.
% dpr.plot_values_junction( 'w', gca )
```
![PlotJunctionGraph_1](static/PlotJunctionGraph_1.png)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment