Muddy y axis and plotting using coordinates
    3 views (last 30 days)
  
       Show older comments
    
    Charlie Chen
 on 31 Mar 2021
  
    
    
    
    
    Commented: Star Strider
      
      
 on 1 Apr 2021
            Hi everyone, 
I am a newbee of Matlab. I am having some issues with plotting. I could use some help.
When I try to plot multiple sets of data, the axies get mudy. I assue it's caused by the overlapping of different scales. Is there a way to clean it up?

T1=[50 53 55 58 59 60 61 61 62]
T2=[ 48 50 52 54 55 57 58 59 60 61 62 62 63]
dCoF1=[2.088360144 2.348487525 2.48784046 2.67016458 2.795948305 2.84171836 2.619815575 2.663693217 2.6249562]
dCoF2=[3.370696371 2.075218238 2.272783201 2.440811388 2.444426417 2.614530643 2.585023679 2.531044092 2.666287724 2.59727857 2.603275966 3.366966847 2.685168655]
p=plot (T1,dCoF1,"-k",T2,dCoF2,"-c")
p(1).Marker="*"
p(2).Marker="o"
Another issue is that I have a set of data that describe force reading under different temperatures. Naturally I want to visualize the data points. Making the data coordinates fall into "temperature bins". Currently I am using line plot, but I am sure there is a better way to do it. 
My Data set:
[(Temperature, Reading)] = [(55,1.98);(58,1.88);(61,2.00);(55,1.93);(56,1.74);(56,1.88)] 
I am thinking asking Matlab to plot based on coordinates, but I don't know how to use a matrix to store the coordinates, and use the plot function.Can you give me any insight?
2 Comments
  Star Strider
      
      
 on 31 Mar 2021
				I get a much ‘cleaner’ result that what you posted.  
What MATLAB release are you using?  
Have you updated it with the latest Update?  
Accepted Answer
  Star Strider
      
      
 on 31 Mar 2021
        ‘I am thinking asking Matlab to plot based on coordinates, but I don't know how to use a matrix to store the coordinates, and use the plot function.Can you give me any insight?’
If they all have the same length (with respect to the independent variable, as they appear to do in this Comment), try something like this: 
x = 1:20;
y = rand(5,20)+(0:4).';
figure
plot(x, y)
ax = gca;
ax.ColorOrder = [1 1 0;1 0 1; 0 1 1; 1 0 0; 0 1 0; 0 0 1; 1 1 1; 0 0 0];
.
4 Comments
More Answers (0)
See Also
Categories
				Find more on Graphics Performance in Help Center and File Exchange
			
	Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

