Skip to content
Advertisement

Plot specific element values in matplotlib

I have a list as below:

JavaScript

I want to show the values of n-th and m-th element of the x-axis and draw a vertical line

JavaScript

enter image description here

For example in the graph above, the 100th elements on the x-axis – how can I show the values on the line?

enter image description here

I tried to knee but it shows only one elbow. I suggest it is the 50th element? But what is exactly x,y??

JavaScript

enter image description here

Advertisement

Answer

You might think that everybody knows this library kneed. Well, I don’t know about others but I have never seen that one before (it does not even have a tag here on SO).
But their documentation is excellent (qhull take note!). So, you could do something like this:

JavaScript

Sample output:

enter image description here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement