Indicate name of filled areas inside area plot - Matlab?

Oliver Amundsen

It's difficult to identify in this area plot each one of the many filled areas by just looking at the legend (it's like 16!).

So, I was wondering if there's a way to place some sort of labels (with a pointer perhaps?) inside the plot that clearly identifies each filled areas?

Thanks!

enter image description here

Benoit_11

Here is an alternative using annotation objects and the textarrow option, which displays text along with an arrow. This could be useful to you to point in narrow regions where text would hide data.

For example:

clear
clc
close all

x = 1:128;

%// Plot data
figure
hAxes1 = axes('Position',[.1 .1 .6 .8]);
image(x.');
axis off
colormap(jet(128))

%// Define labels
ColorLabels = {'Red';'Orange';'Green';'Blue';'More blue'};

%// Define starting and ending x and y positions
xstart = .8;
xend = .6;
ystart = linspace(.1,.8,numel(ColorLabels));
yend = linspace(.15,.8,numel(ColorLabels));
for k = 1:numel(ColorLabels)

    annotation('textarrow', [xstart xend],[ystart(k) yend(k)],...
           'String', ColorLabels{k});    
end

gives the following output:

enter image description here

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

MATLAB Plotting dot in a specific area over a contourfm plot

분류에서Dev

Filling the area between three curves in MatLab with Bold Plot

분류에서Dev

Add an area to a scatter plot in Excel

분류에서Dev

Simple MatLab plot

분류에서Dev

Plot data on to an isosurface in MatLab

분류에서Dev

Plot a complex function in Matlab

분류에서Dev

How to convert HTML to PDF preserving visibility of content inside scrollable areas

분류에서Dev

In matlab, plot a heatmap and a line plot on the same figure

분류에서Dev

Altair area plot with color determined by sign

분류에서Dev

MATLAB, turning numbers off on plot

분류에서Dev

can we manipulate the area covered in MouseOver/Out event in areas chart: Highcharts

분류에서Dev

shade the area between two line vectors in MATLAB

분류에서Dev

Blur circle area in RGB image using MATLAB

분류에서Dev

Name a variable as string in Matlab

분류에서Dev

How can I overlay box plot on scatter plot in matlab or R?

분류에서Dev

MATLAB: creating looping plot with increasing integers

분류에서Dev

Can't Plot Anonymous Function In Matlab

분류에서Dev

error in displaying a 3-D Plot in matlab

분류에서Dev

how to give different linespecs for a plot of matrix in matlab

분류에서Dev

Matlab: using file name as a variable

분류에서Dev

Getting view name inside of controller

분류에서Dev

matlab update two set of subplots inside a loop

분류에서Dev

홈페이지를 Index inside Areas로 연결 하시겠습니까?

분류에서Dev

A difference-in-difference boxplot-like plot in Matlab

분류에서Dev

How tick labels on one of the plot's axis can be multiplied in MATLAB?

분류에서Dev

Color scatter plot in Matlab according to 0 or 1 value

분류에서Dev

MATLAB-Surf Plot 데이터 구조

분류에서Dev

using special characters in variable name Matlab

분류에서Dev

automatically get the name vectors saved in the workspace in Matlab

Related 관련 기사

  1. 1

    MATLAB Plotting dot in a specific area over a contourfm plot

  2. 2

    Filling the area between three curves in MatLab with Bold Plot

  3. 3

    Add an area to a scatter plot in Excel

  4. 4

    Simple MatLab plot

  5. 5

    Plot data on to an isosurface in MatLab

  6. 6

    Plot a complex function in Matlab

  7. 7

    How to convert HTML to PDF preserving visibility of content inside scrollable areas

  8. 8

    In matlab, plot a heatmap and a line plot on the same figure

  9. 9

    Altair area plot with color determined by sign

  10. 10

    MATLAB, turning numbers off on plot

  11. 11

    can we manipulate the area covered in MouseOver/Out event in areas chart: Highcharts

  12. 12

    shade the area between two line vectors in MATLAB

  13. 13

    Blur circle area in RGB image using MATLAB

  14. 14

    Name a variable as string in Matlab

  15. 15

    How can I overlay box plot on scatter plot in matlab or R?

  16. 16

    MATLAB: creating looping plot with increasing integers

  17. 17

    Can't Plot Anonymous Function In Matlab

  18. 18

    error in displaying a 3-D Plot in matlab

  19. 19

    how to give different linespecs for a plot of matrix in matlab

  20. 20

    Matlab: using file name as a variable

  21. 21

    Getting view name inside of controller

  22. 22

    matlab update two set of subplots inside a loop

  23. 23

    홈페이지를 Index inside Areas로 연결 하시겠습니까?

  24. 24

    A difference-in-difference boxplot-like plot in Matlab

  25. 25

    How tick labels on one of the plot's axis can be multiplied in MATLAB?

  26. 26

    Color scatter plot in Matlab according to 0 or 1 value

  27. 27

    MATLAB-Surf Plot 데이터 구조

  28. 28

    using special characters in variable name Matlab

  29. 29

    automatically get the name vectors saved in the workspace in Matlab

뜨겁다태그

보관