# Make a ListContourPlot from a dataset?

**URL:** <https://community.wolfram.com/t/make-a-listcontourplot-from-a-dataset/8694>\
**Category:** Questions\
**Tags:** data-science, graphics-and-visualization\
**Created:** [June 3, 2016, 11:02am UTC](https://community.wolfram.com/t/make-a-listcontourplot-from-a-dataset/8694 "2016-06-03T11:02:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![preetisribaskaran](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@preetisribaskaran](https://community.wolfram.com/u/preetisribaskaran)\
**Post date:** [June 3, 2016, 11:02am UTC](https://community.wolfram.com/t/make-a-listcontourplot-from-a-dataset/8694/1 "2016-06-03T11:02:38Z")

</div>

Hi,

I created a discussion of asking help how to create a contour plot. but it was removed by the moderator telling that i was an easy question to ask for help, I however find this a bit rude. As a beginner, unfortunately not much information exists when having specific questions, especially in my case when i wanted to make a contour plot with a data set…

I I tried running this code as an example just to understand how contour plot works and I simply get an empty box and don’t understand why..,

```
data = {{0.0003, 0.0003, 0.2}, {0.001, 0.0003, 0.7}, {0.002, 0.0003, 
   0.11}, {0.002, 0.0003, 0.11}, {0.003, 0.0003, 0.14}}

ListContourPlot[data, Contours -> 20, AspectRatio -> Automatic, 
 PlotRange -> {{0.0003, 0.003}, {0.0003, 0.003}}, 
 ContourLabels -> All, FrameLabel -> {"KMO", "KSO"}, 
 Background -> White, LabelStyle -> Directive[Black, Bold]]

```

Any help in this aspect would be of a great use to me

Thanks in advance

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [June 3, 2016, 12:06pm UTC](https://community.wolfram.com/t/make-a-listcontourplot-from-a-dataset/8694/2 "2016-06-03T12:06:38Z")

</div>

You didn’t provide a function of the data points to generate contours. Also, for 3 dimensional data, you want ListContourPlot3D.

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [June 3, 2016, 12:39pm UTC](https://community.wolfram.com/t/make-a-listcontourplot-from-a-dataset/8694/3 "2016-06-03T12:39:38Z")

</div>

The answer given by Frank is not the answer. Both the 3D and the normal version should work with ‘3d’ data. The problem is that all the points are on a single line, so you can not create a surface:

```
Graphics[data[[All, ;; 2]] // Point, AspectRatio -> 1, Frame -> True]

```

 ![ScreenShot2016-06-03at14.39.15.png](https://global.discourse-cdn.com/wolfram/original/2X/c/cda12287b1ab31888de168c655f482e9ed7868e3.png)

---

<div class="post-metadata">

**Author:** ![preetisribaskaran](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@preetisribaskaran](https://community.wolfram.com/u/preetisribaskaran)\
**Post date:** [June 3, 2016, 12:43pm UTC](https://community.wolfram.com/t/make-a-listcontourplot-from-a-dataset/8694/4 "2016-06-03T12:43:52Z")

</div>

Thanks a lot for your reponse! is there also any possibility to label those points? for example..in the data i have..{0.0003, 0.0003, 0.2} which means i would like to label the intercept point of 0.0003 and 0.0003 as 0.2..

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [June 3, 2016, 12:47pm UTC](https://community.wolfram.com/t/make-a-listcontourplot-from-a-dataset/8694/5 "2016-06-03T12:47:36Z")

</div>

You could try something like:

```
coors=data[[All,;;2]];
labels=data[[All,3]];
Graphics[{
        Point[coors],
        MapThread[Text[#1,#2,{0,-1}]&,{labels,coors}]
    },
    AspectRatio->1,
    Frame->True,
    PlotRangePadding->Scaled[.05],
    PlotRange->{{0.0003,0.003},{0.0003,0.003}}
]

```

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [June 3, 2016, 1:12pm UTC](https://community.wolfram.com/t/make-a-listcontourplot-from-a-dataset/8694/6 "2016-06-03T13:12:21Z")

</div>

The question was “how to do a contour plot”. Perhaps the question was phrased wrong.
