Questions tagged [matlab-figure]

MATLAB is a high-level language and programming environment developed by MathWorks. This tag relates to the creation and manipulation of graphical plots and visualizations in MATLAB figures. For questions on the creation of graphical user interface (GUI) applications in MATLAB, consider using [tag:matlab-gui], [tag:matlab-guide] or [tag:matlab-app-designer].

MATLAB is a high-level language and programming environment developed by MathWorks.

This tag relates to the creation and manipulation of graphical plots and visualizations in MATLAB figures. For questions on the creation of graphical user interface (GUI) applications in MATLAB, consider using , or .

Additional sources of technical information on these topics include:

3812 questions
1
vote
1 answer

How to plot a point on a image when the point's coordinate is outside the range of the image (matlab)

With MATLAB, it is easy to show an image, and then plot a point on the image. For example, figure; imshow(image); hold on; plot(x,y,'r*'); This can usually work if the point is within the image. When the coordinate (x,y) is not in the range of the…
feelfree
  • 11,175
  • 20
  • 96
  • 167
1
vote
1 answer

Define vector to use for colorbar in MATLAB

I am plotting a bar+scatter plot where the scatter points are colored according to a separate variable. The problem I am having is that the colorbar is using the wrong values at the moment. If I just plot the scatter plot and add a colorbar, then…
Minary
  • 17
  • 4
1
vote
2 answers

How to make more tick marks appear in graph?

I want more tick marks appear in graph. For example, if I do this: plot(1:1000), I get the following: How to make more tick marks appear as shown at the X-axis of the following figure? I want to do the same for Y-axis. Customizing this is not…
EkEhsaas
  • 93
  • 9
1
vote
1 answer

How to show a zoomed part of a graph within a MATLAB plot?

I have about four series of data on a Matlab plot, two of them are quite close and can only be differentiated with a zoom. How do I depict the zoomed part within the existing plot for the viewer. I have checked similar posts but the answers seem…
Abdulhameed
  • 200
  • 1
  • 12
1
vote
0 answers

How to create a color bar in Matrix laboratory?

I can create a false color, but I cannot color the bar in figure below. How can I create a colorbar for the figure below?
reza.naimi
  • 11
  • 4
1
vote
2 answers

How to plot several function calls in one figure

I made a matlab-function that plots a graph. When I call the function several times, I want it to plot all the graphs in one prepared figure. But instead my code opens with every function call the prepared figure in a new window with only one Graph…
crx
  • 153
  • 2
  • 8
1
vote
1 answer

matlab contour plot specific value

I have made a contour plot in matlab (See code). And I want to find the contour line where the value is equal to 1. Now I just have found it approximately between to lines contour plot: Can this be done? For example if I want to plot 5 contour…
ursmooth
  • 311
  • 1
  • 4
  • 12
1
vote
1 answer

Tag is empty when using brush in MATLAB

This question is related to This Question. I have followed the example from there: t=0:0.2:25; plot(t,sin(t),'.-'); brush on pause hBrushLine = findall(gca,'tag','Brushing'); brushedData = get(hBrushLine, {'Xdata','Ydata'}); brushedIdx =…
El_Loco
  • 1,716
  • 4
  • 20
  • 35
1
vote
3 answers

Plotting data point in different clusters

I have my data points and cluster number as follows: X Y cluster -0.42042 0.2071 0 -1.4986 -1.8658 0 -0.50905 -0.0751 0 2.1978 1.9568 1 1.4901 1.6177 1 1.6961 1.8293 1 1.6021 0.0857 1 0.87831 0.71435 1 2.6688 1.3426 …
gpuguy
  • 4,607
  • 17
  • 67
  • 125
1
vote
2 answers

How to include Annotate extends ... in this MATLAB findpeaks?

I have minimums and maximums in the output now (Fig.1) but I would like to get labels (Fig. 2) for sorted maximums (tallest get 1, ...) and similarly for minimums (lowest gets 1). I can do the output of Fig. 1 by the following but I cannot…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
1
vote
0 answers

Matlab: Directly getting table into uitable

Consider the following table in Matlab LastName = {'Smith';'Johnson';'Williams';'Jones';'Brown'}; Age = [38;43;38;40;49]; Height = [71;69;64;67;64]; Weight = [176;163;131;133;119]; BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80]; T =…
pkj
  • 559
  • 1
  • 9
  • 21
1
vote
0 answers

Why are no oscillations appearing in my Lotka-Volterra time series plots in Matlab?

I am trying to model the Lotka-Volterra Predator-Prey system, using the coupled DE's: dy(1)/dt = rx(1-x/k) - ay(1)y(2) % prey population dy(2)/dt = aby(1)y(2) - dy(2) % predator population Here is the code I have : % Solves equations using…
1
vote
2 answers

Why is there Gap in this Matlab Polar presentation with export_fig?

Code which yields a gap at the line from origo (0,0) to (1,0), which seems to reach zero if C dimensions reaches infinity; however, I cannot get it small enough with any sizes of C so I think the artifact can be caused by Matlab figure internal…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
1
vote
1 answer

Matlab: How to draw polygons to figure and get image matrix of specified size?

Today I wanted to experiment with semi-transparent polygons (specifically triangles) in Matlab. What I need to do is to draw several (semi-transparent) polygons (which can overlap) into figure and then get matrix (of size H x W ) of RGB pixel…
Andrew
  • 11
  • 2
1
vote
1 answer

Matlab - Two Subplots, single color scale and colorbar

consider the following code x = [-1:0.1:1]; subplot(2,2,1) imagesc(x,x,abs(x)/100) colorbar subplot(2,2,2) imagesc(x,x,abs(x)) colorbar What I want to happen Is that both images will be on the same color scale, and the same color bar I.e., that…
Amir Sagiv
  • 376
  • 5
  • 23