forked from wangting0310njtech/Multi-robot-SLAM-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotenv.m
More file actions
59 lines (45 loc) · 1.39 KB
/
plotenv.m
File metadata and controls
59 lines (45 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
function plotmap(inM, size_of_marker);
if ~exist('M','var')
global M
M = inM;
end
if ~exist('axHndl','var')
global axHndl
end
if ~exist('figNumber','var')
global figNumber
end
[xmax, ymax] = size(M);
[x, y] = find(M);
ssize = get(0,'ScreenSize');
figNumber = figure;
set(figNumber,'MenuBar','none','Position',[1 29 ssize(3) ssize(4)-47],'NumberTitle','off',...
'Name','Simulation Window','RendererMode','manual','Renderer','Painters',...
'Backingstore','off','tag','map');
plothandle = plot(x,y,'s', ...
'Color','g', ...
'MarkerFaceColor','g',...
'MarkerSize',size_of_marker);
set(plothandle,'xdata',x,'ydata',y)
axis equal
axHndl=gca;
color = get(figNumber,'Color');
set(axHndl, ...
'XLim',[0 xmax+1],'YLim',[0 ymax+1], ...
'XDir','normal','YDir','normal', ...
'Drawmode','fast', ...
'Visible','on', ...
'NextPlot','add', ...
'tag','axes',...
'XColor',color,...
'YColor',color);
h1 = uicontrol('Parent',figNumber, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'Callback','close(gcbf)', ...
'ListboxTop',0, ...
'Position',[ssize(3)-round(ssize(3)/3) round(ssize(4)/30) 51.75 21], ...
'String','Close', ...
'Tag','cpclose', ...
'TooltipString','Click to quit');
drawnow;