Get coordinates of geom_hline interception - coordinates

Is it possible to get the coordinates of the intersection of geom_hline in ggplot from the plot? The image below has a geom_hlline meeting with my line plot but I am hoping to get an exact x-value of the intercept. Please help.
ggplot with geom_hline shown here
Thanks!

Related

Scaning specified area for random curve and get coordinates

I want to scan the curve in matlab for a specified area suppose 0-10 in X axis and 50-150 in y-axis and get the co-ordinates of the points of the line.
I am very new in this. I am starting from scratch. so any help is appreciated.
regards
Borad

ploting circle in matlab map figure with scircleg

I want to plot a circle on a map figure.
I tried the axesm function and then the scircleg but although the mouse clicks worked the coordinates don’t pass and the following message appears
Attempt to execute SCRIPT message as a function:
c:\did\zmap\zmap\src\message.m
Error in scircleg (line 124)
warning(message('map:scircleg:emptyLATPTS'))
Any help is welcome
Thank you in advance
if you need to add circles on a plot for indicating something on an existing figure, you can use:
hold on
plot(100,200,'o');
This adds a small circle at point (100,200).

How get coordinates of specific points (i.e turning points) in Matlab

I have a set of (X, Y) coordinates which, when plotted produce a graph as in the pictures below. What I am trying to do, is to find the coordinates of the areas (corner points) circled in red.
I have been trying to find ways to accomplish this, as those actual turning points represents my area of interest. Please note that I do not have the actual equation for those coordinates.
I would find it grateful if someone could please advise me, or give me some directions on how to go about this, either by using Matlab, or even some other ideas using some C++ tools.
I manage to solve this using a combinaison of the Point Cloud Library and Matlab. The former helped me to separate the coordinates in line segments (RANSAC) and using the latter, I was able to get the Equation of each line segments (Curve Fitting), and simply compute the intersection point through some basic math calculation.

Plotting a trapezium in MATLAB

How can I plot a figure in MATLAB such as a trapezium by giving only the vertices? I want the vertices connected by solid lines. I also want to calculate the area enclosed by the trapezium.
How can I do that?
There are many options for plotting.
plot, fill, patch would all be possibilities.
Use the function polyarea to give you the area specified by a set of vertices.
use fill(x,y,colour)
fill([1,2,3,4],[6,3,4,9],"red")
or plot(x,y) with the first elements repeated at the end:
plot([1,2,3,4,1],[6,3,4,9,6])
Edit: for the area
polyarea([1,2,3,4],[6,3,4,9])

get the y coordinates by clicking on the plot in matlab

I am trying to get the y coordinates on a xy plot by clicking on the plot. This is very similar to the function ginput which will generate a cursor and by clicking on the plot you can get the x and y coordinates where the cursor is placed. However, for my particular purpose, I want to have a line cross the figure instead of cursor as a guide of determining the right y value to use. Is there any function in matlab can do this? If not, what is the way to do it? Any help is greatly appreciated.
I don't believe there is a pre-packaged function for that, but you can do it using the strategies described in this video tutorial from Doug Hull, with slight modifications.