Discussion:
[Matplotlib-users] How to add data points to a contour map.
Dr Sydney Shall
2015-02-12 16:07:12 UTC
Permalink
I am a beginner and I use Python 2.7 on an iMac OSX 10.9.5. Python is
the Enthought installation.
I am doing simulation experiments. I have constructed a 2D contour map
with my results and I am happy with the result.
I am wondering if it is possible to add the data points, say as red
dots, on this contour map.
I have not been able to find an equivalent example in gallery and I am
too much a novice to know what to do.
Any help would be much appreciated.
--
Sydney
Paul Hobson
2015-02-12 17:00:46 UTC
Permalink
Definitely. Assuming you don't want to do this in an interactive manner
(i.e. pointing and clicking with your mouse:

fig, ax = plt.subplots()
ax.contour(...)
ax.plot(x_dots, y_dots, 'ro', label='Dots')
-p
Post by Dr Sydney Shall
I am a beginner and I use Python 2.7 on an iMac OSX 10.9.5. Python is
the Enthought installation.
I am doing simulation experiments. I have constructed a 2D contour map
with my results and I am happy with the result.
I am wondering if it is possible to add the data points, say as red
dots, on this contour map.
I have not been able to find an equivalent example in gallery and I am
too much a novice to know what to do.
Any help would be much appreciated.
--
Sydney
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is
your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Dr Sydney Shall
2015-02-13 12:55:09 UTC
Permalink
Post by Paul Hobson
Definitely. Assuming you don't want to do this in an interactive
fig, ax = plt.subplots()
ax.contour(...)
ax.plot(x_dots, y_dots, 'ro', label='Dots')
-p
On Thu, Feb 12, 2015 at 8:07 AM, Dr Sydney Shall
I am a beginner and I use Python 2.7 on an iMac OSX 10.9.5. Python is
the Enthought installation.
I am doing simulation experiments. I have constructed a 2D contour map
with my results and I am happy with the result.
I am wondering if it is possible to add the data points, say as red
dots, on this contour map.
I have not been able to find an equivalent example in gallery and I am
too much a novice to know what to do.
Any help would be much appreciated.
--
Sydney
Thanks Paul. Works perfectly.
I should have been able to work that out for myself, but my format was
wrong.
Cheers.
--
Sydney
Continue reading on narkive:
Loading...