forked from tutusjtu/FigureBest-2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FigureBestV2.m
958 lines (751 loc) · 34.4 KB
/
FigureBestV2.m
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
function varargout = FigureBestV2(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @FigureBestV2_OpeningFcn, ...
'gui_OutputFcn', @FigureBestV2_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% --- Executes just before FigureBestV2 is made visible.
function FigureBestV2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to FigureBestV2 (see VARARGIN)
% Choose default command line output for FigureBestV2
handles.output = hObject;
handles.FB.Name = 'FigrueBest v2.0.2';
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes FigureBestV2 wait for user response (see UIRESUME)
% uiwait(handles.FB);
% --- Outputs from this function are returned to the command line.
function varargout = FigureBestV2_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in start.
function start_Callback(hObject, eventdata, handles)
iNumberVector=str2num(handles.iNumber.String);
global iColor;
global idrawType;
global name;
global Dimention;
global isOut;
iColor=getappdata(handles.color,'Color');
idrawType=getappdata(handles.iDrawType,'iDrawType');
name = getappdata(handles.name,'name');
Dimention=getappdata(handles.is3D,'is3D');
isOut=getappdata(handles.isOut,'isOut');
if ~isempty(iNumberVector)
for i=1:length(iNumberVector)
controlAll(iNumberVector(i));
end
else
f=gcf;
controlAll(f.Number);
end
function iNumber_Callback(hObject, eventdata, handles)
% hObject handle to iNumber (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of iNumber as text
% str2double(get(hObject,'String')) returns contents of iNumber as a double
% --- Executes during object creation, after setting all properties.
function iNumber_CreateFcn(hObject, eventdata, handles)
% hObject handle to iNumber (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --------------------------------------------------------------------
function Untitled_1_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function ICON1_Callback(hObject, eventdata, handles)
% hObject handle to ICON1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on selection change in iDrawType.
function iDrawType_Callback(hObject, eventdata, handles)
% hObject handle to iDrawType (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns iDrawType contents as cell array
% contents{get(hObject,'Value')} returns selected item from iDrawType
T=0;
switch hObject.Value
case 1
T=2;
case 2
T=1;
case 3
T=2;
end
setappdata(hObject,'iDrawType',T);
% --- Executes during object creation, after setting all properties.
function iDrawType_CreateFcn(hObject, eventdata, handles)
% hObject handle to iDrawType (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
setappdata(hObject,'iDrawType',2);
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
set(hObject,'Visible','off');
% --- Executes on selection change in color.
function color_Callback(hObject, eventdata, handles)
% hObject handle to color (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns color contents as cell array
% contents{get(hObject,'Value')} returns selected item from color
switch hObject.Value
case 1
C=42;
case 2
C=21;
case 3
C=22;
case 4
C=3;
case 5
C=41;
case 6
C=42;
case 7
C=43;
case 8
C=5;
case 9
C=6;
end
setappdata(hObject,'Color',C);
% --- Executes during object creation, after setting all properties.
function color_CreateFcn(hObject, eventdata, handles)
% hObject handle to color (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
setappdata(hObject,'Color',21);
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
set(hObject,'Visible','off');
% --- Executes on button press in result.
function result_Callback(hObject, eventdata, handles)
% hObject handle to result (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
filePath=pwd;
winopen(filePath);
function name_Callback(hObject, eventdata, handles)
% hObject handle to name (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of name as text
% str2double(get(hObject,'String')) returns contents of name as a double
%输入名字
name=handles.name.String;
setappdata(hObject,'name',name);
% --- Executes during object creation, after setting all properties.
function name_CreateFcn(hObject, eventdata, handles)
% hObject handle to name (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
setappdata(hObject,'name','FigureFromTuTu');
set(hObject,'Visible','off');
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in YesOut.
function YesOut_Callback(hObject, eventdata, handles)
% hObject handle to YesOut (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of YesOut
Yes=handles.YesOut.Value;
if Yes==1
set(handles.result,'Visible','on');
set(handles.name,'Visible','on');
set(handles.tips_name,'Visible','on');
set(handles.NoOut,'Value',0);
% else
% set(handles.result,'Visible','off');
% set(handles.name,'Visible','off');
% set(handles.tips_name,'Visible','off');
end
% --- Executes during object creation, after setting all properties.
function YesOut_CreateFcn(hObject, eventdata, handles)
% hObject handle to YesOut (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes on button press in isOut.
function isOut_Callback(hObject, eventdata, handles)
% hObject handle to isOut (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of isOut
if hObject.Value==1;
set(handles.name,'Visible','on');
set(handles.tips_name,'Visible','on');
set(handles.result,'Visible','on');
setappdata(hObject,'isOut',1);
set(handles.remind,'String','图片将以指定名称被保存!');
else
set(handles.name,'Visible','off');
set(handles.tips_name,'Visible','off');
set(handles.result,'Visible','off');
setappdata(hObject,'isOut',0);
set(handles.remind,'String','当前美化不/未保存!');
end
% --- Executes on button press in is3D.
function is3D_Callback(hObject, eventdata, handles)
% hObject handle to is3D (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of is3D
if hObject.Value==1
setappdata(hObject,'is3D',3);
set(handles.remind,'String','用于控制三维视图的角度')
else
setappdata(hObject,'is3D',2);
set(handles.remind,'String','二维作图模式')
end
% --- Executes during object creation, after setting all properties.
function isOut_CreateFcn(hObject, eventdata, handles)
% hObject handle to isOut (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
setappdata(hObject,'isOut',0);
set(hObject,'Visible','on');
% --- Executes during object creation, after setting all properties.
function is3D_CreateFcn(hObject, eventdata, handles)
% hObject handle to is3D (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
setappdata(hObject,'is3D',2);
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function result_CreateFcn(hObject, eventdata, handles)
% hObject handle to result (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function tips_name_CreateFcn(hObject, eventdata, handles)
% hObject handle to tips_name (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes on button press in test.
function test_Callback(hObject, eventdata, handles)
% hObject handle to test (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.remind,'String','正在生成一些用于测试效果的图片......');
test;
set(handles.remind,'String','测试图片生成——>已完成');
% --- Executes on button press in singlecolumn.
function singlecolumn_Callback(hObject, eventdata, handles)
% hObject handle to singlecolumn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.remind,'String',{'正在设置双栏格式'});
iNumberVector=str2num(handles.iNumber.String);
for i=1:length(iNumberVector)
handleMyFigure=findall(groot,'Type','figure','Number',iNumberVector(i))
handleMyFigure.Name='图图的绘图格式-双栏';
handleMyFigure.Units='centimeters'; %改为厘米为单位
%设置图片的大小,双栏选择[10, 10, 9, 6.75]cm,[相对位置 宽度高度]
handleMyFigure.Position=[10, 10, 9, 6.75];
handleMyFigure.Resize='off';
handleMyFigure.Color='w'; %将图形背景设置为白色
%打印属性 和图片属性相仿
handleMyFigure.PaperUnits='centimeters';
handleMyFigure.PaperPosition=[10, 10, 9, 6.75];
handleMyFigure.InvertHardcopy='off';%保存图像坐标背景色
end
set(handles.remind,'String',{'双栏格式设置完成,图片已规范化!'});
% --- Executes on button press in doublecolumn.
function doublecolumn_Callback(hObject, eventdata, handles)
% hObject handle to doublecolumn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.remind,'String',{'正在设置单栏格式'});
iNumberVector=str2num(handles.iNumber.String);
for i=1:length(iNumberVector)
handleMyFigure=findall(groot,'Type','figure','Number',iNumberVector(i))
handleMyFigure.Name='图图的绘图格式-单栏';
handleMyFigure.Units='centimeters'; %改为厘米为单位
%设置图片的大小,单栏选择[10, 4, 19, 14.25]cm,[相对位置 宽度高度]
handleMyFigure.Position=[10, 4, 19, 14.25];
handleMyFigure.Resize='off';
handleMyFigure.Color='w'; %将图形背景设置为白色
%打印属性 和图片属性相仿
handleMyFigure.PaperUnits='centimeters';
handleMyFigure.PaperPosition=[10, 4, 19, 14.25];
handleMyFigure.InvertHardcopy='off';%保存图像坐标背景色
end
set(handles.remind,'String',{'单栏格式设置完成,图片已规范化!'});
% --- Executes on button press in expert.
function expert_Callback(hObject, eventdata, handles)
% hObject handle to expert (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
name=getappdata(handles.name,'name');
if ~strcmp(name,'FigureFromTuTu')
disp('正在导出');
set(handles.remind,'String',{'正在导出,格式为高分辨率PNG'});
iNumberVector=str2num(handles.iNumber.String);
for i=1:length(iNumberVector)
handleMyFigure=findall(groot,'Type','figure','Number',iNumberVector(i));
myExportFigure(handleMyFigure,name);
end
disp('导出成功')
set(handles.remind,'String',{'已经成功导出,可以点击快速看图!'});
set(handles.show,'Enable','on');
else
disp('请先打开输出开关,并输入名字')
set(handles.remind,'String',{'请先打开输出开关,并输入图片名!'});
end
% --- Executes on button press in show.
function show_Callback(hObject, eventdata, handles)
% hObject handle to show (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
filePath=pwd;
fid=fopen('name_append.txt','r');
i=1;
while feof(fid)~=1
nameMatrix{i}=fgetl(fid);
i=i+1;
end
fclose(fid);
for i=1:length(nameMatrix)
name=nameMatrix{i};
if ~isempty(name)
winopen([filePath,'\',name,'.png']);
else
disp('请先打开输出开关,并输入名字');
set(handles.remind,'String','请先打开输出开关,并输入名字');
end
end
function remind_Callback(hObject, eventdata, handles)
% hObject handle to remind (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of remind as text
% str2double(get(hObject,'String')) returns contents of remind as a double
% --- Executes during object creation, after setting all properties.
function remind_CreateFcn(hObject, eventdata, handles)
% hObject handle to remind (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
set(hObject,'String','欢迎使用图图的软件');
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
set(hObject,'Visible','on');
% --- Executes on button press in addlegend.
function addlegend_Callback(hObject, eventdata, handles)
% hObject handle to addlegend (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.remind,'String','为某个figure添加图例');
modifyLegendRecognize(fignum2handle(str2num(handles.iNumber.String)));
set(handles.remind,'String','添加图例完成');
% --- Executes on button press in font.
function font_Callback(hObject, eventdata, handles)
% hObject handle to font (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
figNum=str2num(handles.iNumber.String);
%(figNum,fontSize,fontName,boldType,latexType)
prompt = {'输入字号(数字):','输入字体','输入是否加粗(bold/normal):','输入解释器(latex/none)'};
dlgtitle = '字体相关参数设置';
dims = [1 35];
definput = {'12','Arial','bold','none'};
answer = inputdlg(prompt,dlgtitle,dims,definput)
fontSize=str2num(answer{1});
fontName=answer{2} ;
boldType=answer{3} ;
latexType=answer{4} ;
fontsizenamebold(figNum,fontSize,fontName,boldType,latexType);
function XL_Callback(hObject, eventdata, handles)
% hObject handle to XL (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of XL as text
% str2double(get(hObject,'String')) returns contents of XL as a double
% --- Executes during object creation, after setting all properties.
function XL_CreateFcn(hObject, eventdata, handles)
% hObject handle to XL (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
set(hObject,'Visible','off');
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in fill.
function fill_Callback(hObject, eventdata, handles)
% hObject handle to fill (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.remind,'String','此功能慎用~');
axesfillfigure(str2num(handles.iNumber.String));
shg;
% --- Executes on button press in label.
function label_Callback(hObject, eventdata, handles)
% hObject handle to label (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.XL,'Visible','on');
set(handles.YL,'Visible','on');
set(handles.ZL,'Visible','on');
set(handles.TI,'Visible','on');
set(handles.XB,'Visible','on');
set(handles.YB,'Visible','on');
set(handles.ZB,'Visible','on');
set(handles.TB,'Visible','on');
set(handles.addXYZT,'Visible','on');
set(handles.pushbutton15,'Visible','on');
function YL_Callback(hObject, eventdata, handles)
% hObject handle to YL (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of YL as text
% str2double(get(hObject,'String')) returns contents of YL as a double
% --- Executes during object creation, after setting all properties.
function YL_CreateFcn(hObject, eventdata, handles)
% hObject handle to YL (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function ZL_Callback(hObject, eventdata, handles)
% hObject handle to ZL (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of ZL as text
% str2double(get(hObject,'String')) returns contents of ZL as a double
% --- Executes during object creation, after setting all properties.
function ZL_CreateFcn(hObject, eventdata, handles)
% hObject handle to ZL (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function Ti_Callback(hObject, eventdata, handles)
% hObject handle to Ti (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of Ti as text
% str2double(get(hObject,'String')) returns contents of Ti as a double
% --- Executes during object creation, after setting all properties.
function Ti_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ti (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in addXYZT.
function addXYZT_Callback(hObject, eventdata, handles)
% hObject handle to addXYZT (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.remind,'String','添加坐标轴文字中...!如果有子图,会提示您选择坐标轴');
axess=findall(fignum2handle(str2num(handles.iNumber.String)),'Type','axes');
if length(axess)>=2
set(handles.remind,'String','因为有子图,所以你有5秒钟的时间单击你要选择的坐标轴!');
pause(5);
myAxesHandle=gca;
if strcmp(myAxesHandle.Type,'axes')
set(handles.remind,'String','选择错误,请重试一次');pause(1);
set(handles.remind,'String','因为有子图,所以你有5秒钟的时间单击你要选择的坐标轴!');
pause(5);
myAxesHandle=gca;
if myAxesHandle.Type~='axes'
set(handles.remind,'String','再次错误,请重新来');return
end
end
elseif length(axess)==1
myAxesHandle=axess;
else
myAxesHandle=gca;
end
myAxesHandle.XLabel.String=handles.XL.String;
myAxesHandle.YLabel.String=handles.YL.String;
myAxesHandle.ZLabel.String=handles.ZL.String;
myAxesHandle.Title.String=handles.TI.String;
%myAxesHandle.Ti.String=handles.Ti.String;
set(handles.remind,'String','添加已完成!');
% --- Executes on button press in pushbutton15.
function pushbutton15_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton15 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.XL,'Visible','off');
set(handles.YL,'Visible','off');
set(handles.ZL,'Visible','off');
set(handles.TI,'Visible','off');
set(handles.XB,'Visible','off');
set(handles.YB,'Visible','off');
set(handles.ZB,'Visible','off');
set(handles.TB,'Visible','off');
set(handles.addXYZT,'Visible','off');
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function addXYZT_CreateFcn(hObject, eventdata, handles)
% hObject handle to addXYZT (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
myAxesHandle.XLabel.String='defaultX';
myAxesHandle.YLabel.String='defaultY';
myAxesHandle.ZLabel.String='defaultZ';
function TI_Callback(hObject, eventdata, handles)
% hObject handle to TI (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of TI as text
% str2double(get(hObject,'String')) returns contents of TI as a double
% --- Executes during object creation, after setting all properties.
function TI_CreateFcn(hObject, eventdata, handles)
% hObject handle to TI (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes during object creation, after setting all properties.
function label_CreateFcn(hObject, eventdata, handles)
% hObject handle to label (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% set(handles.XL,'Visible','off');
% set(handles.YL,'Visible','off');
% set(handles.ZL,'Visible','off');
% set(handles.TI,'Visible','off');
% set(handles.XB,'Visible','off');
% set(handles.YB,'Visible','off');
% set(handles.ZB,'Visible','off');
% set(handles.TB,'Visible','off');
% set(handles.addXYZT,'Visible','off');
% set(handles.pushbutton15,'Visible','off');
% --- Executes during object creation, after setting all properties.
function pushbutton15_CreateFcn(hObject, eventdata, handles)
% hObject handle to pushbutton15 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function XB_CreateFcn(hObject, eventdata, handles)
set(hObject,'Visible','off');
% hObject handle to XB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes during object creation, after setting all properties.
function YB_CreateFcn(hObject, eventdata, handles)
% hObject handle to YB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function ZB_CreateFcn(hObject, eventdata, handles)
% hObject handle to ZB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function TB_CreateFcn(hObject, eventdata, handles)
% hObject handle to TB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function show_CreateFcn(hObject, eventdata, handles)
% hObject handle to show (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Enable','off');
% --------------------------------------------------------------------
function ICON2_Callback(hObject, eventdata, handles)
% hObject handle to ICON2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
h=imshow('持续说明.png');
f=h.Parent.Parent;
f.Name='关于软件的说明';
f.Resize='off';
f.Position=[100 100 400 400];
f.NumberTitle='off';
f.MenuBar='none'
shg;
% --------------------------------------------------------------------
function ICON4_Callback(hObject, eventdata, handles)
% hObject handle to ICON4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% if password()==1;
% else
% set(handles.remind,'String','密码错误!');
% myicon = imread('tutu.jpg');
% h=msgbox('请关注微信公众号“tutongdao”图通道回复“FBPW”获取最新密码','密码错误','custom',myicon);
% end
% --------------------------------------------------------------------
function ICON3_Callback(hObject, eventdata, handles)
% hObject handle to ICON3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes during object creation, after setting all properties.
function ICON3_CreateFcn(hObject, eventdata, handles)
% hObject handle to ICON3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --------------------------------------------------------------------
function ICON4_ButtonDownFcn(hObject, eventdata, handles)
% hObject handle to ICON4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes during object creation, after setting all properties.
function uibuttongroup4_CreateFcn(hObject, eventdata, handles)
% hObject handle to uibuttongroup4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function uibuttongroup5_CreateFcn(hObject, eventdata, handles)
% hObject handle to uibuttongroup5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes during object creation, after setting all properties.
function test_CreateFcn(hObject, eventdata, handles)
% hObject handle to test (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
set(hObject,'Visible','off');
% --- Executes on button press in pushbutton18.
function pushbutton18_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton18 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function closeall_Callback(hObject, eventdata, handles)
% hObject handle to closeall (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton19.
function pushbutton19_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton19 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
web('https://space.bilibili.com/223755925','-browser')
disp('[开发者] 图通道')
catch
disp('联网后访问以下网址:')
disp('https://space.bilibili.com/223755925')
end
% --- Executes on button press in pushbutton20.
function pushbutton20_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton20 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles.remind.String = ' ';
set(handles.uibuttongroup4,'Visible','off');
set(handles.uibuttongroup5,'Visible','off');
set(handles.isOut,'Visible','on');
set(handles.test,'Visible','off');
set(handles.remind,'Visible','on');
set(handles.color,'Visible','off');
set(handles.iDrawType,'Visible','off');
set(handles.is3D,'Visible','off');
set(handles.name,'Visible','off');
set(handles.tips_name,'Visible','off');
set(handles.result,'Visible','off');
% --- Executes on button press in pushbutton21.
function pushbutton21_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton21 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles.remind.String = ' ';
set(handles.uibuttongroup4,'Visible','on');
set(handles.uibuttongroup5,'Visible','on');
set(handles.isOut,'Visible','on');
set(handles.test,'Visible','on');
set(handles.remind,'Visible','on');
set(handles.is3D,'Visible','on');
set(handles.color,'Visible','on');
set(handles.iDrawType,'Visible','on');
% --- Executes on button press in pushbutton22.
function pushbutton22_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton22 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close all;
clc;
% --- Executes on button press in pushbutton23.
function pushbutton23_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton23 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close(findall(0,'tag','Msgbox_ '));
% --- Executes on button press in pushbutton24.
function pushbutton24_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton24 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
web('https://www.bilibili.com/video/BV17L4y1x78W','-browser')
disp('[开发者] 图通道')
catch
disp('联网后访问以下网址:')
disp('https://www.bilibili.com/video/BV17L4y1x78W')
end
% --- Executes during object creation, after setting all properties.
function FB_CreateFcn(hObject, eventdata, handles)
% hObject handle to FB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called