Skip to main content

All Questions

Tagged with
14 questions with no upvoted or accepted answers
3 votes
0 answers
97 views

In a quiver plot with ShowArrowHead = 'off', how do I keep the arrowhead from displaying in the legend as well?

When plotting with quiver() and setting the 'ShowArrowHead' property to 'off', the arrowheads aren't shown in the plot (as expected). However, the legend entry still shows an arrowhead. I would expect ...
localhost's user avatar
2 votes
1 answer
2k views

Choosing specific line to legend in different matlab runs

I have made a simulation that calculates trajectories of objects and plot it. The figure looks like this: figure(1) plot(ArrayRT1,ArrayRT2); hold on plot(ArrayRD1,ArrayRD2); plot(ArrayRM1,ArrayRM2); ...
Ben's user avatar
  • 1,829
2 votes
3 answers
373 views

How to customize a legend in matlab plot window

As shown in the image below, the legend is too long for the plot window. what I want to do is: 1- To know how to split the legend over a second line? 2- To know how to shorten the red line in ...
Amrmsmb's user avatar
1 vote
0 answers
181 views

Change LineWidth of marker in MatLab

I would like to change the linewidth of the marker independent from the linewidth of the plotted solid line. By now (see code) I am able to change it in the plot itself. The legend however is a ...
WM_noob5's user avatar
1 vote
0 answers
709 views

How could I rotate in 90 degrees the legend of a plot on Matlab?

I'm creating some plots and I need to rotate in 90 degrees the legend to avoid the overlapping of the legend over the graphic. I've tried to use the 'Rotation' propriety but I receive the following ...
Timmit's user avatar
  • 11
1 vote
0 answers
49 views

adding a legend in 3 for loops with three plots .MATLAB

l want to make a legend for my figure but l have 3 for loops with three plots like mentioned below : legend 1 : essential legend 2 : less essential legend 3 : most important for P=1:K % body ...
vincet's user avatar
  • 937
1 vote
1 answer
347 views

Matlab text overflows legend

Very irritating there is enough size on the graph to widen the legend but it does not resize automatically to the content. Anyone a suggestion on how to fix this? (latex interpreter set to legend) ...
BigChief's user avatar
  • 1,505
0 votes
1 answer
473 views

Matlab: Replicate legend location's 'outside' scaling behavior

The preceding figure was produced by the following code: hold on; plot([1,2,3,4],[1,2,3,4]); plot([1,2,3,4],[4,3,2,1]); legend('foo', 'bar', 'location', 'eastoutside'); Re-scaling the width of the ...
i3rendn4v05's user avatar
0 votes
0 answers
71 views

Legend displayed wrongly, one entry is out of the box, one is inside

I just wanted to add a very simple legend to my plots. But every time I want to add a legend, it displays it as can be seen in the picture: One entry has a very long line and the second entry is on ...
ANova's user avatar
  • 1
0 votes
1 answer
562 views

Legend in bar3 in MATLAB

I can't figure out how to create the legends (for colors) in the attached code? test1=[5 10 7; 1 100 0; 1 3 2]; test2=[10 15 10; 10 80 10; 5 5 15]; test3=[10 10 10; 20 200 20; ...
Reza 's user avatar
  • 11
0 votes
0 answers
306 views

Matlab legend colors don't match lines (2)

I'm experiencing the same problem as on this thread: Matlab legend colors don't match lines However, no variation of the solution proposed seems to work on my code... My code is: thickness = ...
nimellos's user avatar
0 votes
1 answer
498 views

Matlab: Long, multiline, Legends with latex interpreters

I have several lines in a figure, each of them having their own legend entries. One of the legend entries is quite long, and I need it to split up into lines. Further, since I have some symbols coming ...
AaKa's user avatar
  • 1
0 votes
2 answers
833 views

Is it possible to separate the legend entry line into two parts in Matlab

I would like to know if it's possible to separate the line from the legend entry into two different types of lines. Example : imagine that you have 4 curves : solid black, solid red, dashed black, ...
mwoua's user avatar
  • 403
0 votes
1 answer
237 views

How to force legend entries as power of 10 in MATLAB

This is an extension of How to change display format of legend in MATLAB. I am looking for a way to force the legend entries in a particular format. In following code, they are displayed like ...
NAASI's user avatar
  • 173