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
9
votes
3 answers

subplots with different colormaps matlab

I am trying to make a graph with two different contourf subplots that use completely different colormaps. However with the code I currently have (which creates a custom colormap for one of the subplots), the subplots come out with the same colormap.…
agold2121
  • 103
  • 1
  • 6
9
votes
4 answers

Remove only axis lines without affecting ticks and tick labels

Is there a way to remove only the axis lines in the Matlab figure, without affecting ticks and tick labels. I know that box toggles the upper and right axes lines and ticks and that works perfectly for me. But my problem is that I want eliminate…
Denny Alappatt
  • 135
  • 1
  • 2
  • 5
9
votes
4 answers

Disallow MATLAB to take focus automatically

I have the following problem: in my MATLAB code I use statements like figure(1) to change destination figure for some data. The problem is that after this MATLAB take system focus on the window with this figure. When I run a big script in the…
drsealks
  • 2,282
  • 1
  • 17
  • 34
9
votes
2 answers

Changing figure fonts in Matlab has no effect

I'm having problems with rendering Greek characters in my labels and legends, so I thought maybe switching fonts would help. Thus, I discovered an even bigger problem - Matlab doesn't seem to honor my font settings at all. I've tried, of…
Tomas Aschan
  • 58,548
  • 56
  • 243
  • 402
9
votes
4 answers

How to create reports containing text and figures with MATLAB

I am using a MATLAB script to tune the control system on a machine. When the tuning is complete, I would like a report containing text (especially serial number, date/time and the values determined during tuning) and plots, especially transfer…
Nigel Davies
  • 1,640
  • 1
  • 13
  • 26
9
votes
4 answers

How do I add two legends to a single plot in MATLAB?

I'd like to add two legends to a plot in MATLAB. How can I do this?
Will
  • 4,241
  • 4
  • 39
  • 48
8
votes
1 answer

Previews of matlab figures in Windows explorer (utility to set an image as the thumbnail for another file)

Has anyone come up with a way to make thumbnail type previews for matlab figures in windows? I'm getting tired of saving a .png along with the .fig file just so I know what was in it. A useful helper for this would be a command line utility for…
Alex
  • 5,863
  • 2
  • 29
  • 46
8
votes
4 answers

Remove border around Matlab plot

Matlab is displaying a black border around a plot and I would like to remove it. I think i should be using something like: set(Figure#,'PropertyName',PropertyValue); But I'm not sure what PropertyName or PropertyValue should be used... Edit: I…
GPSmaster
  • 844
  • 3
  • 15
  • 31
8
votes
4 answers

How can I plot a one-bar stacked bar chart in MATLAB?

If I do a bar([1 2 3 4 5;2 3 4 5 1], 'stacked') I get two bars of stacked values corresponding to the two rows of my data - as I expected: I would like to be able to similarly plot a stacked bar chart with only one bar, but if I try like…
Thomas Arildsen
  • 1,079
  • 2
  • 14
  • 31
8
votes
1 answer

MATLAB pcolor/surf bilinear interpolation (shading interp)

Consider the following MATLAB code: C = [ 0 0 0 0 0 0 1 2 1 0 0 2 4 2 0 0 1 2 1 0 0 0 0 0 0 ]; pcolor( C ); shading interp; axis square Note that C is invariant under 90 degree rotations. Also note this sentence from the…
cfp
  • 208
  • 1
  • 7
8
votes
2 answers

2-D line gradient color in Matlab

Is it possible to add gradient color to 2-D line in Matlab, especially when you have small number of data points (less than 10?), so the result would be similar to one in image below?
Claude Monet
  • 143
  • 1
  • 1
  • 8
8
votes
2 answers

Creating a polar histogram

Polar histograms can be very useful for plotting stacked bar graph with multiple entries. An example is provided in the image below of the figure target. This can be made somehow easily in R with ggplot2. Similar function as 'rose' in matlab doesn't…
s__C
  • 135
  • 1
  • 6
8
votes
2 answers

Greek letter in Matlab plot

I have created a plot in Matlab and now I would like to add a legend with the following command: legend({'Pos1', 'Pos2', 'Pos3', '\alpha Pos4'}, 'Location', 'northeast', 'Interpreter', 'latex', 'fontsize', 22); legend('boxoff') The problem is that…
Erdinger
  • 111
  • 7
8
votes
1 answer

How to precisely control line thickness in MATLAB plot?

I would like to precisely control the thickness of the line plotted in MATLAB. Not just 0.5, 1, 2, 3, ... points but e.g. 0.2mm. Is it possible? There is a custom line scale and minimum line width box in the export setup window but that does not…
Szymon Bęczkowski
  • 370
  • 1
  • 4
  • 9
8
votes
2 answers

MATLAB remove ticks on one axis while keeping labels

I want to make a MATLAB plot that has tick labels but no tick marks on the x axis, but does have tick marks on the y axis. How can I do this? I can't use set(gca,'XTick',[]) because this would remove the tick labels. I also can't…
Max Radin
  • 427
  • 1
  • 6
  • 11