Group Abstract Group Abstract

Message Boards Message Boards

Make a ListContourPlot from a dataset?

Posted 9 years ago

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

Attachments:
5 Replies
POSTED BY: Sander Huisman

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}}
]
POSTED BY: Sander Huisman

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

POSTED BY: Frank Kampas

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

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard