Answered
graph subtitle?
Starting in r2020b, you can add a title and subtitle using [t,s]=title('myTitle','mySubtitle') or t = title('myTitle'); s...

6 years ago | 1

Discussion


New in r2020b: Subtitles & Title/Label Alignment
<</matlabcentral/discussions/uploaded_files/1744/mainImg.png>> *Add a subtitle* Multi-lined titles have been supported for...

6 years ago | 15

Answered
How can I change the code to get this plot?
Key points. Use scatter() instead of plot() so you can control individual marker size. Scale the radii values ('r') to a rang...

6 years ago | 0

| accepted

Answered
Passing an UIAxes handle to PlotFcn
tl;dr use the OutputFcn method below. Using a custom optimplotfval "I would like to make the 'optimplotfval' function to plot...

6 years ago | 2

| accepted

Answered
how to give title and axes in histfit?
You have a variable in your workspace named xlabel. Rename that variable. Example of this error: xlabel = 'apples'; xlab...

6 years ago | 0

| accepted

Answered
Convert variable to numeric in TimeTable
Convert your columns containing cellstrings to numeric vectors. Example: TT1_sta.Var2 = str2double(TT1_sta.Var2); repeat fo...

6 years ago | 1

| accepted

Answered
plot 4 plots on 3 axes
If the x-values, F{1}, F{2}, V{1}, and Z{1}, are all on different scales that cannot be rescaled to share a single scale, the pl...

6 years ago | 0

Answered
Automatically naming mat files with variable names
Use fullfile to define the full path and file name. destination = 'H:\My_Directory\Mat_Files'; filename = fullfile(destinatio...

6 years ago | 0

Answered
Set aspect ratio in tilelayout
You either need to apply the settings after plotting the data or you need to execute "hold on" after applying the settings, befo...

6 years ago | 1

| accepted

Answered
How to Display in multiple axes text and images using UIPanel instead of figure ?
fh should be your app's figure handle. fh = app.UIFigure; % or whatever your fig handle is. or perhaps you want to assign th...

6 years ago | 0

| accepted

Answered
progress bar does not change color (Load)
To summarize the discussion in the comment section under the question, to use the pseudo-colorbar shown in this community highli...

6 years ago | 0

| accepted

Answered
How to make a specific element of an image transparent
See the AlphaData & AlphaDataMapping properties of an image. https://www.mathworks.com/help/matlab/ref/matlab.graphics.primiti...

6 years ago | 0

| accepted

Answered
How can I create different colors in the plotted chart for a lot of data
Inspired by Turlough Hughes's slider used to chose a line object, here's a way to add info to each line's data tip so you can ho...

6 years ago | 1

Answered
Plot vertical lines from a point to x-axis
Use a stem plot.

6 years ago | 2

| accepted

Answered
Shadow on xy plane of line in plot3?
To project the 3D line onto each pair of 2D axes, set the axis limits first and then use the min or max axis limits depending on...

6 years ago | 3

| accepted

Answered
MATLAB bug for plotting? Overlap between the x-ticks and the number labels: when using inverted y-axis and logarithmic x-axis.
The best solution is to upgrade to a newer release of Matlab. Update your current release might address the problem (I haven't...

6 years ago | 0

| accepted

Answered
Can a function known whether/which specific output is ignored (tilde operator)?
"Can a function known whether/which specific output is ignored ?" No. nargout tells you the number of output arguments specifi...

6 years ago | 2

| accepted

Submitted


detectOutputSuppression
Identify which function outputs have been suppressed by the caller using the tilde operators.

6 years ago | 86 downloads |

5.0 / 5
Thumbnail

Answered
How can I plot data from a text file--an array of numbers versus an array of strings?
Here's a variety of ways to use the strings as axis ticks. After a second look, you're probably looking for the last method. ...

6 years ago | 0

| accepted

Answered
Legend Color doesn't Match the Curves Color
I see the problem. Look at the values you're plotting. Assuming a=0.5e-2; semilogy(z,PDF_Hp,'LineWidth',4); PDF_Hp = Co...

6 years ago | 0

| accepted

Answered
how to write in the middle of ticks?
Datetime x-ticks for 6-month intervals It looks like you want to set xtick, not minor ticks. If your data are in datetime fo...

6 years ago | 2

| accepted

Answered
Problem to read csv file with a blank line
The first character in your file is a semicolon (;) which is also the delimiter and that's making it difficult to import your da...

6 years ago | 1

| accepted

Answered
Legend and Colors for Iteration function
Use the displayname property to assign the legend string and use the "color" property to set the line color. % Define colors ...

6 years ago | 0

| accepted

Answered
Jet Colormap with black and white at the ends
cm = [0 0 0; jet(20); 1 1 1];

6 years ago | 0

Answered
How to draw line logarithmic x axis and y axis
Convert the dates to duration from the starting date but use the numeric form of the durations (ie, not the "duration' class). ...

6 years ago | 0

Answered
Standard error of regression curve
Follow this answer provided by MathWorks support [here]. Since the degrees of freedom are not defined in that answer, here's a ...

6 years ago | 0

| accepted

Answered
Writing data into a text file - fprintf
You need to pass the ReactionTime variable in as an input. function savedata(ReactionTime) . . . %savedata fprintf(fid, ...

6 years ago | 2

Answered
How to compare each element of matrix to specific number and count it ?
m is your matrix, n is the number of values less than 3. n = sum(m<3,'all') There's no need for an if-statement.

6 years ago | 0

| accepted

Answered
Limiting UIAxes Interactivity in AppDesigner
The first line below turns off default interactivity and the second line turns off the toolbar options. disableDefaultInteract...

6 years ago | 1

| accepted

Answered
How can I create a temperature colormap over a global map with temperature data from lat/lon
imagesc(x,y,C) where x and y are your lon and lat data and C are your temp data. It's always a good idea to specify the axes,...

6 years ago | 0

| accepted

Load more