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

Display plot information only when cursor is on it - Matlab

I have a plot like this There are 30 lines on this plot and each line corresponds to a particular object. Now I want to display all the object's name. But I don't want a messy legend with 30 entries. What I want is to be able to hover the cursor…
Black Dagger
  • 377
  • 2
  • 6
  • 18
1
vote
0 answers

How to convert a stack of medical images from the work space into .png without losing information in a specific folder?

I have medical images of 130 patients in a folder which includes two types of files for each patient. For example, patient1.mhd and patient1.rawfiles. I downloaded Matlab FileExchange to read these files. But I have to import each patients' files…
S.EB
  • 1,966
  • 4
  • 29
  • 54
1
vote
2 answers

3D oblique projection view, how to change y-axis

I want to have a 3D oblique projection view: For this I use a code (just without axes) like this angle = 30; surf(x, -x*sind(angle)+y*cosd(angle),z) axis off view([90,50]) Another solution that works similarly (using coordinate transformation for…
Alexander Korovin
  • 1,639
  • 1
  • 12
  • 19
1
vote
2 answers

How to generate a matrix of bode plots?

I have multiple bode plots and would like to draw them in a compact way to ease visual evaluation. I thought of sth. like an nxm matrix plot. However, I could not find out how to realize that either in Matlab or Python. Any suggestions helping me to…
Rickson
  • 1,040
  • 2
  • 16
  • 40
1
vote
1 answer

Clean logarithmic scale (loglog) plot

I have this loglog plot that I would like to clean up on y-axis which, you see below, is a bit of a mess. I would like the plot to look like this: More specifically I want to remove the ticks that are visible between the values (0, 10e-2, 10e-4,…
Antia
  • 23
  • 1
  • 4
1
vote
1 answer

Colorbar's colormap not updating when also adding a label to the bar

Below's some code that generates a figure that has a colorbar with a custom label: function q41269479 % Create an axes: figure(); % Display an image: hIm = imagesc(peaks); % Adjust colormap and colorbar: h = colorbar; colormap(gray); ylabel(h,…
Dev-iL
  • 23,742
  • 7
  • 57
  • 99
1
vote
1 answer

Making push button visible in maingui after clicking close push button in subgui

I have a main gui with 2 pushbuttons. The first button opens a subgui and the other button is the "run" pushbutton which is 'Enable'=Off. It's grey and not clickable. I know I can turn the enable "on" with this command:…
jdoubleu
  • 73
  • 5
1
vote
1 answer

MATLAB - adding plot to another plot after loop, more sophisticatedly

i have a problem and i hope that i will find help there. This is my example code. Its only part of my algorithm. For imagine, how the point are moving, during the equations, i need show contour of function with two variables and into the points.…
1
vote
1 answer

Matlab GUI waitbar

I was writing a little script to start getting used to waitbars in MATLAB and I wanted to set the edge color of the waitbar to green and the face color to blue but it just doesn't work; I keep getting the face color in green and the edge in…
chsafouane
  • 291
  • 2
  • 3
  • 15
1
vote
0 answers

Error using == Matrix dimensions must agree. Error in Naivayes (line 21) if (yy{j}==yu{i})

Am totally new to Matlab I need some help, I got some error while running the code fid = fopen('C:\Users\Oni\Documents\MATLAB\data.csv')'; out = textscan(fid,'%s%s%s%s%s','delimiter',','); fclose(fid); num_featureswithclass = size(out,2); tot_rec…
1
vote
1 answer

How to put random labels in stacked bar plot matlab

I create a horizontally stacked bar plot as below:- data(1,:)=[0,55,87,96,97,98,99,100,102,125,130]; data(2,:)=[0,55,65,107,110,129,131,0,0,0,0]; data(3,:)=[0,60,104,108,128,130,0,0,0,0,0]; barh(data,'stacked') axis ij set(gca, 'xlim',[0,1000],…
user_1_1_1
  • 903
  • 1
  • 12
  • 27
1
vote
1 answer

Selection Callback for text input

I'm using MATLAB GUIDE to build a GUI to control a piece of hardware. I have a data table the user needs to fill, and every time they select a cell a new configuration is sent to the hardware. This is easily done using the…
David K
  • 1,296
  • 18
  • 39
1
vote
0 answers

How can I make the data cursor show the CData value in a patch plot

I frequently plot spatial data in MATLAB using patch. Using the data cursor on the resulting plots gives the (x,y) coordinates of the nearest node. I would like to use it to give the data value at that point as well. My assumption is that I will…
Flyto
  • 676
  • 1
  • 7
  • 18
1
vote
1 answer

Create Matlab figures in LaTeX using matlabfrag or alternatives

I want to include Matlab figures into latex preferably with vectorised formats but with LaTeX MATLAB fonts for all text. I have been using the MATLAB function matlab2tikz which worked perfect for simple figures, but now my figures have too many data…
M.Thomas
  • 97
  • 1
  • 1
  • 6
1
vote
1 answer

Exporting a 3D Line (Plot3) from Matlab to U3D/LaTeX

What I am trying to do is export a figure as STL, U3D, anything which would get me a step further into including these plots as 3D PDFs in a LaTeX document. From the reading I have done, it is straightforward to convert a surface/quiver into U3D…
gktscrk
  • 173
  • 2
  • 12