geoplotFS

geoplotFS calls geoplotAPP.mlapp to show an interactive geoplot with polygons

Syntax

  • geoplotFS(Y,score,ShapeFile)example

Description

In the app it is also possible choose the variabile of Y to show, the type of plot (i.e. in latitude and longitude coordinates or in the original coordinates of ShapeFile), the direction of the colorbar.

example

geoplotFS(Y, score, ShapeFile) Example where second input argument is a numeric scalar.

Examples

expand all

  • Example where second input argument is a numeric scalar.
  • a=struct2table(ver);
    MappingInstalled=any(string(a{:,1})=="Mapping Toolbox");
    if MappingInstalled ==true
    load citiesItaly2024.mat
    X=citiesItaly2024;
    ShapeFile=X.Properties.UserData{1};
    % Show the geoplot of the third variable of table X
    geoplotFS(X,3,ShapeFile)
    else
    disp('This function requires the "mapping toolbox" is installed')
    end
    Click here for the graphical output of this example (link to Ro.S.A. website).

    Related Examples

    expand all

  • Example where second input argument is a string.
  • load citiesItaly2024.mat
    X=citiesItaly2024;
    ShapeFile=X.Properties.UserData{1};
    geoplotFS(X,"QualLif",ShapeFile)
    Click here for the graphical output of this example (link to Ro.S.A. website)

  • Example where second input argument is a character.
  • load citiesItaly2024.mat
    X=citiesItaly2024;
    ShapeFile=X.Properties.UserData{1};
    geoplotFS(X,'SpendingA',ShapeFile)
    Click here for the graphical output of this example (link to Ro.S.A. website)

  • Example where second input argument is a matrix.
  • load citiesItaly2024.mat
    X=citiesItaly2024;
    out=pcaFS(X,'biplot',0,'dispresults',0,'plots',0);
    ShapeFile=X.Properties.UserData{1};
    % Color based on PCs
    geoplotFS(X,out.score,ShapeFile)
    The first PC already explains more than 0.95^v variability
    In what follows we still extract the first 2 PCs
    
    Click here for the graphical output of this example (link to Ro.S.A. website)

    Input Arguments

    expand all

    Y — Input data. 2D array or table.

    n x v data matrix; n observations and v variables. Rows of Y represent observations, and columns represent variables.

    Missing values (NaN's) and infinite values (Inf's) are allowed, since observations (rows) with missing or infinite values will automatically be excluded from the computations.

    Data Types: single|double

    score — variable to show or nxp matrix containing variables to show. Numeric scalar, of string or character identifying the initial variable to use in the geoplot.

    Alternatively, score can contain a nxp array for example with the p principal components Example - 'ShapeFile','shapefileName'

    Data Types: char or string numeric scalar or nxp array.

    ShapeFile — name of ShapeFile or geospatial table containg shapes. Character or string or geotable.

    Name of the ShapeFile containing the containing the geometric details of the rows. The ShapeFile, which is loaded using function readgeotable, must have n rows and the n rows must have the same order of the n rows of Y.

    Remark: note that this option can be used just is the "Mapping toolbox" is installed.

    Example - 'ShapeFile','shapefileName'

    Data Types: char or string or geotable.

    Output Arguments

    References

    See Also

    This page has been automatically generated by our routine publishFS