Register to reply

2-D contour plot with gnuplot

by hamidamini
Tags: contour, gnuplot, plot
Share this thread:
hamidamini
#1
Mar29-12, 07:37 AM
P: 2
Hello
with gnuplot
I need to have 2d contour plot from a file (say ss.dat) with three column, first and secend columns are X and Y respectively and the third column is magnitude (I need to have this magnitude with labels on it in 2d plot).

Thanks in advance
Hamid
Phys.Org News Partner Science news on Phys.org
Physical constant is constant even in strong gravitational fields
Montreal VR headset team turns to crowdfunding for Totem
Researchers study vital 'on/off switches' that control when bacteria turn deadly
LeePhillips
#2
Apr8-12, 09:06 PM
P: 3
Assuming your file contains grid data, the basic commands to generate a contour plot would be

set contour base
unset sur
set view map
splot 'file'

gnuplot will generate a key mapping dash patterns in the contours to values. If you want actual numerical labels printed on the contours, you have to resort to tricks. I describe one way to do it in the gnuplot Cookbook.
hamidamini
#3
Apr10-12, 06:17 AM
P: 2
Thank you very much. my file dose not have grid data. it just has three coulmn first is "x"axis second "y" and third is just the data I want to have the plot of. How can I grid x and y axis.

Thanks

LeePhillips
#4
Apr10-12, 08:25 AM
P: 3
2-D contour plot with gnuplot

Your data might already be in grid form, depending on how it is organized. Type "help grid_data" at the gnuplot interactive prompt to find out what this means. Even if it is not, the plot might work. Try it and see. If your data is scattered you might be able to plot it after letting gnuplot convert it into a grid arrangement. Type "help dgrid3d" to find out how to do this.


Register to reply

Related Discussions
How do I plot step functions in gnuplot? Math & Science Software 6
How to plot and save many data files in GNUPLOT, inside a loop in a SHELL SCRIPT Programming & Computer Science 0
Gnuplot - Omitting part of a plot? Math & Science Software 0
Contour Plots in Gnuplot Math & Science Software 1
Gnuplot to plot values of a line of data Computing & Technology 0