पृष्ठभूमि
the documentation example here से, कोई आसानी से कोड स्निपेट के साथ निम्नलिखित समोच्च साजिश का उत्पादन कर सकता है।matplotlib में समोच्च से निर्देशांक प्राप्त करें?
import matplotlib
import numpy as np
import matplotlib.cm as cm
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
matplotlib.rcParams['xtick.direction'] = 'out'
matplotlib.rcParams['ytick.direction'] = 'out'
delta = 0.025
x = np.arange(-3.0, 3.0, delta)
y = np.arange(-2.0, 2.0, delta)
X, Y = np.meshgrid(x, y)
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
# difference of Gaussians
Z = 10.0 * (Z2 - Z1)
# Create a simple contour plot with labels using default colors. The
# inline argument to clabel will control whether the labels are draw
# over the line segments of the contour, removing the lines beneath
# the label
plt.figure()
CS = plt.contour(X, Y, Z)
plt.clabel(CS, inline=1, fontsize=10)
plt.title('Simplest default with labels')
मेरे लक्ष्य
मैं अपने समोच्च भूखंड प्राप्त किया है और इस बीच matplotlib.contour.QuadContourSet
उदाहरण CS
मिला है। उदाहरण में स्निपेट, CS
का उपयोग केवल clabel()
के लिए किया जाता है। हालांकि मेरे मामले के लिए, मुझे या तो समोच्च रेखा के समीकरण या आगे गणना के लिए समन्वय सेट प्राप्त करने की आवश्यकता है।
उदाहरण CS
से समोच्च रेखा के निर्देशांक कैसे निकालें? या मैं इसे अन्य तरीकों से कैसे प्राप्त कर सकता हूं?
मुझे यकीन है कि ऐसा करने का एक तरीका होना चाहिए। अन्यथा, समोच्च चीज केवल "दृश्यता के लिए फूलदान" है।
http://scikit-image.org/docs/dev/auto_examples/plot_contours.html – tacaswell