Plot grraph , srink is problem
    5 ビュー (過去 30 日間)
  
       古いコメントを表示
    
the following code is plot the graph I want to change the Y axis value so that the box and plot on x -axis does concide , I try it using limit commmand but it just srink the graph 
x=-1000:25:975
u_exact=[-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.25E-08	-9.25E-08	-9.26E-08	-9.27E-08	-9.28E-08	-9.31E-08	-9.36E-08	-9.45E-08	-9.63E-08	-1.00E-07	-1.12E-07	-1.75E-07	-4.18134E+12	-1.77E-07	-1.12E-07	-1.00E-07	-9.63E-08	-9.45E-08	-9.36E-08	-9.31E-08	-9.28E-08	-9.27E-08	-9.26E-08	-9.25E-08	-9.25E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08]
u_RDTM=[-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.25E-08	-9.25E-08	-9.26E-08	-9.27E-08	-9.28E-08	-9.31E-08	-9.36E-08	-9.45E-08	-9.63E-08	-1.00E-07	-1.12E-07	-1.75E-07	-4.18134E+12	-1.77E-07	-1.12E-07	-1.00E-07	-9.63E-08	-9.45E-08	-9.36E-08	-9.31E-08	-9.28E-08	-9.27E-08	-9.26E-08	-9.25E-08	-9.25E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08]
plot(x,u_RDTM,'o',x,u_exact)
xlim([-1844 2054])
ylim([-6950633103752 1818593846248])
0 件のコメント
回答 (1 件)
  Torsten
      
      
 2024 年 8 月 25 日
        I don't know what you mean by  "I want to change the Y axis value so that the box and plot on x -axis does concide".
Maybe like this:
x=-1000:25:975;
u_exact=[-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.25E-08	-9.25E-08	-9.26E-08	-9.27E-08	-9.28E-08	-9.31E-08	-9.36E-08	-9.45E-08	-9.63E-08	-1.00E-07	-1.12E-07	-1.75E-07	-4.18134E+12	-1.77E-07	-1.12E-07	-1.00E-07	-9.63E-08	-9.45E-08	-9.36E-08	-9.31E-08	-9.28E-08	-9.27E-08	-9.26E-08	-9.25E-08	-9.25E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08];
u_RDTM=[-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.25E-08	-9.25E-08	-9.26E-08	-9.27E-08	-9.28E-08	-9.31E-08	-9.36E-08	-9.45E-08	-9.63E-08	-1.00E-07	-1.12E-07	-1.75E-07	-4.18134E+12	-1.77E-07	-1.12E-07	-1.00E-07	-9.63E-08	-9.45E-08	-9.36E-08	-9.31E-08	-9.28E-08	-9.27E-08	-9.26E-08	-9.25E-08	-9.25E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08];
semilogy(x,u_RDTM,'o',x,u_exact)
7 件のコメント
  DGM
      
      
 2024 年 9 月 1 日
				I didn't know this since I run an older version, but (in some versions newer than R2019b) you can do the following to apply some padding on both x and y.
x=-1000:25:975;
u_exact=[-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.25E-08	-9.25E-08	-9.26E-08	-9.27E-08	-9.28E-08	-9.31E-08	-9.36E-08	-9.45E-08	-9.63E-08	-1.00E-07	-1.12E-07	-1.75E-07	-4.18134E+12	-1.77E-07	-1.12E-07	-1.00E-07	-9.63E-08	-9.45E-08	-9.36E-08	-9.31E-08	-9.28E-08	-9.27E-08	-9.26E-08	-9.25E-08	-9.25E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08];
u_RDTM=[-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.25E-08	-9.25E-08	-9.26E-08	-9.27E-08	-9.28E-08	-9.31E-08	-9.36E-08	-9.45E-08	-9.63E-08	-1.00E-07	-1.12E-07	-1.75E-07	-4.18134E+12	-1.77E-07	-1.12E-07	-1.00E-07	-9.63E-08	-9.45E-08	-9.36E-08	-9.31E-08	-9.28E-08	-9.27E-08	-9.26E-08	-9.25E-08	-9.25E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08	-9.24E-08];
plot(x,u_RDTM,'o',x,u_exact)
axis padded
I'm not sure where this change was made, but it's been five years, so I assume that this is an option for most people, especially students.
参考
カテゴリ
				Help Center および File Exchange で Graphics Performance についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!






