DIVA software

 

AddMap

Page history last edited by Steven Morris 1 yr ago

Adding user 2D maps

 

Maps data is kept in special MATLAB structures. Each map is an element of variable project.map. Each map refers to the same set of papers, so the maps can be explored together cross-manipulated.

 

Mapped papers keys and date variable

  • The keys of the mapped papers, which can be used in SQL queries to extract data about each paper from the database, are in the variable project.patentnumber.
  • The dates of the mapped papers, in MATLAB date format, are contained in the variable project.date.
  • These two variables are created by bib2diva.m routine from bibliographic clustering analysis.

 

 

Map structure variable

The information for each map is kept in a structure variable array project.map(i), where i is the index of the map. The maps names on the listbox in the Map section of the TFGUI window appear in map index order.

 

  • Assume that there are n mapped papers. The map variable has the following fields:
    • project.coord This is a n by 2 variable that holds the x and y coordinates for each paper on the map. The scale of the coordinates are not restricted, the maps are autoscaled when they are drawn. The coordinates are in the same order as project.patentnumber.
    • project.name This is string holding the map name, which appears in the map list on TFGUI.
    • project.type Contains a string denoting the type of map. The type can be either timeline if the map is a timeline or som2d if the map is a simple two dimensional map.
    • project.cluster Holds the cluster variable for the map from which dendrogam informatin is extracted for placing on the map. Maps that are not timelines do not have this variable.

 

Inserting the map into the project variable.

 

Once you've created a 2D map, you need to insert the coordinates, name, and type into a map structure variable and add the map's name to the TFGUI dropdown box list.

 

Use can use the routine below, putnewmap, taken from the bib2diva routine, as a guide for inserting the map structure variable. In this routine posa contains the cordinates, indexes contains the indexes of the papers being mapped, maptype is the map type, 'rx'' is the structure variable, which isn't needed for 2D maps.

 

%------function to update main gui with new map-----
function putnewmap1(posa,indexes,maptype,rx)
global project;
if nargin == 2 ; maptype = 'som2d'; end;
replystring =inputdlg('Enter the map name','',1,{'map'});
if ~isfield(project,{'map'})
newmap=1
else
newmap=length(project.map)+1;
end
project.map(newmap).coord=posa(indexes,:) ;
project.map(newmap).name=char(replystring); 
project.map(newmap).type=maptype;
project.map(newmap).cluster=rx;
project.map(newmap).cluster.sim=[];
set(findobj('tag','maplist'),'string',...
{project.map(:).name});
set(findobj('tag','maplist'),'value',newmap);
msgbox('Coordinate file successfully loaded');

Comments (0)

You don't have permission to comment on this page.