How to make marker plot of ♡ on MATLAB? [duplicate] - matlab

This question already has answers here:
Is it possible to change markers in Matlab plot function? [duplicate]
(1 answer)
Custom Markers for Matlab plot
(1 answer)
Closed 3 years ago.
I know in MATLAB, the marker plot only like this table.
How to make the other marker plot symbol? Like "love" marker? '♡'? This is my code
clear all;
clc;
x=[1,2,3];
y=[3,2,1];
plot(x,y,'b♡','markerfacecolor','y','markersize',15);
grid on;
The 'b♡' give an error in the MATLAB because the '♡' symbol does not exist

Related

How to plot with different colors [duplicate]

This question already has answers here:
How to hold a plot when using plot3 in matlab?
(1 answer)
plot hold for plot3 matlab
(1 answer)
Closed 5 years ago.
I am trying to plot a spiral with 8 turns. In each turn it is supposed to have a different color.
t = -1*pi*1:0.02:pi*1;
plot3(sin(t),cos(t),-1*pi*1:0.02:pi*1,'g')
t1 = -1*pi*2:0.02:pi*2;
plot3(sin(t1),cos(t1),-2*pi*1:0.02:pi*2,'r')
For now i am only plotting two turns, but it just turns out red. I have tried using hold on and hold off but its not working. Any suggestions?
check this
plot3(sin(t),cos(t),-1*pi*1:0.02:pi*1,'g-',sin(t1),cos(t1),-2*pi*1:0.02:pi*2,'r--')
The problem is that your red plot actually plots overtop of your previous one you should increase BOTH the lower bound and upper bound.
numberOfColors = 5;
for n = 0:numberOfColors-1
t = -pi + n*2*pi:0.02:pi + n*2*pi;
plot3(sin(t),cos(t),t,'Color',rand(3,1))
hold on
end

How to get the boundary edge for object in MATLAB [duplicate]

This question already has answers here:
Find contour of 2D object in image in matlab
(1 answer)
Contour detection in MATLAB
(1 answer)
MATLAB - Find contour of a binary bit map?
(3 answers)
Compute contour of a binary image using matlab
(3 answers)
Closed 5 years ago.
I'm working to classify objects as human or non-human. My research focuses on the shape detection. I tried to use the function edge in MATLAB but I do not know how to find the boundary edge for the head, neck and shoulders only for a human object from an image. In another words I want to ignore the internal edges; I just want the boundary edge.
Can anyone help me in this?
i want to get this part only from the human object

Is is possible to name a plot and attain a legend in MATLAB? [duplicate]

This question already has an answer here:
legend for selected plot objects in MATLAB figure
(1 answer)
Closed 8 years ago.
I have several plots in a MATLAB code. But handling the legend colors each time is painful. Is there a way to name plots such as plot1=... and then using this name attaina color to a corresponding legend?
Yes:
plot1 = plot(x,y);
legend(plot1, 'series 1', 'series 2');
plot1 is called the figure handle

Getting values from axis on mouse click [duplicate]

This question already has answers here:
Retrieving X and Y values from Matlab Plot
(4 answers)
Closed 9 years ago.
I'm developing a GUI in Matlab that presents a plot (in an axis object). When clicking on a point in the plot, the GUI will open some other plots for that data point.
I added an axis object to my figure and implement the WindowButtonDownFcn to get a button click. I can get the mouse position with
pos=get(hObject,'CurrentPoint');
but how do I convert it to values in my plot? (i.e. which x-value was clicked on)
thanks.
(I'd be happy to hear if there is some simpler way to do this, instead of writing my own GUI)
Try looking up the help on ginput and then set that to some variable. Then plot the points for the number of ginputs you've done.
A lot of it is explained here: http://www.mathworks.com/help/techdoc/ref/ginput.html

Matlab/Octave export 2D-plot as image without showing it [duplicate]

This question already has an answer here:
Print Plot in Octave in Background
(1 answer)
Closed 9 years ago.
I need to create an ocatve script which will generate a 2D-plot and then directly export it as image without actually plotting it.
Hypothetical Example:
x=1:10;
exportDirectly(x,'myImage.jpg');
Is this possible?
You can create a figure, but turn of visibility. Then plot and save as usual.
something like
fh = figure()
fh.set('Visible','Off')
%Some Plotting here
print(fh)
That might be of some help...