12/7/2023 0 Comments Change matlab plot colorsOr without the for, better: load spectra.mat Īll them unfortunately prior the plotting. Cyclic: change in lightness of two different colors that meet in the middle and. Title('Near Infrarred Spectra for Gasoline Samples') If there is an intuitive color scheme for the parameter you are plotting. This is pseudocode which will not run if you don't have t, x and c defined.ĭata, and the code shown here, cooked, just ready for you: load spectra.mat For more plotting colours and settings: MATLAB Documentation: LineSpec - Line style, marker, and color. The default colors provide a clean and consistent look across the different plots you create. In this case MATLAB is trying to take the last colour specification given. MATLAB® creates plots using a default set of colors. Trivially, and ignoring most -if not all- performance etiquette, through a for call you can set colours while building a plot, plotting each column inside the loop, and setting/applying the colormap 'on the fly', just as suggested by the pointed post, but which is not the question: for i=1:n 1 Answer Sorted by: 1 Taking out the -k (black line) will allow the new plot not to suppress the -r (red line). Some info on how to keep the color of data points' constant and change only background color of plot will be of great help. The default background color of a plot is White. Colors, font sizes, line thickness, and many other plot attributes all have. Following this, i've plotted a matrix of signals t (m by 1) and x (m by n): plot(t,x) Īnd, after that, i am wishing to apply a coloured scheme on colormap matrix c (n by 3). 1 Link Answered: Kherbache Abdelkader on Hi, I wanted to know as to how I can go about changing the background color in a plot. To plot the new data, create a new frame and switch to XY Line plot type.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |