Skip to content
Advertisement

Plotting a particular set of contour line at desired point or location

I want a contour plot showing contour levels corresponding to a particular set of x,y. I tried increasing the number of contour lines but it doesn’t give the contour line near the required point. enter image description here

I want to get a contour line to suppose around (0.1,0.1) but am not able to do so, I tried increasing the number of contours but matplotlib doesn’t plot it near the required point nor do I know the level of contour near that point.

JavaScript

It is not the complete code. Any kind of help or hint is highly appreciated.

Advertisement

Answer

You could use a not evenly spaced number of levels for the contour:

JavaScript

Then you can use this parameter to plot the contour:

JavaScript

You can tune the power value in order to change the skewness of the contour levels according to your needs:

  • power = 1

    enter image description here

  • power = 3

    enter image description here

Complete Code

JavaScript

Note

In your code you didn’t reported the expression of VgN, so I supposed it to be something like VgN = X*Y in the code above and so the above images represent this equation. Change it according to your expression of VgN.

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