Sponsored Content
Top Forums UNIX for Advanced & Expert Users Gnuplot question: plotting 3D data in map view Post 302137535 by karman on Tuesday 25th of September 2007 01:47:37 PM
Old 09-25-2007
I found a partial answer myself. Suppose the xyz points are in the file "file.xyz". The following gnuplot commands will then produce a map with the points colored by z-value:

set pm3d
set palette rgb 33,13,10
set view map
splot 'file.xyz' with points palette pt 5 ps 0.5


Some explanation:
- set pm3d activates a package that allows coloring points by value;
- the palette command will create a much used color scale: blue-green-yellow-red;
- set view map will disable 3d view, but show a map view instead;
- splot plots the points in the file;
- "pt 5" specifies pointtype 5, meaning a triangle;
- "ps 0.5" specifies pointsize 0.5, meaning so small that it almost looks like a filled dot.

The only problem with this command is that it does not seem possible to produce filled symbols. All symbol types are open symbols. Also, each time you need to enter the splot command with all the specified options, which is a bit cumbersome in case you just want to make a quick plot.

If anyone knows how to make all these settings the default ones, or how to create a function/macro that does it, that would be appreciated.
 

9 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Gnuplot question: how to plot 3D points as colored points in map view?

I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this: - points in map view (no 3D view) - color of each point should depend on its z-value. - I want to define my own color scale -... (0 Replies)
Discussion started by: karman
0 Replies

2. UNIX for Dummies Questions & Answers

Plotting Data within UNIX

I have a set of data that looks similar to the following in UNIX: 0.12_0.008_fall_ff.out:bisect return: 0.08056640625 0.12_0.04_fall_ff.out:bisect return: 0.07470703125 0.12_0.12_fall_ff.out:bisect return: 0.06298828125 0.12_0.24_fall_ff.out:bisect return: 0.05126953125 Previously I have... (4 Replies)
Discussion started by: EDALBNUG
4 Replies

3. UNIX for Dummies Questions & Answers

Help with extracting data and plotting

I have attached a txt file, what I would like to be able to do is: 1. Extract Data from Columns labeled E/N and Ko into a new file 2. Then in the new file I would like to be able to plot E/N on the X axis and Ko on the y axis. 3. Lastly I would like to be able to extract multiple data sets and... (6 Replies)
Discussion started by: gingburg
6 Replies

4. UNIX for Dummies Questions & Answers

Plotting boxes in gnuplot

When I plot a set of data in gnuplot from a file like: 1 5 2 3 4 6 5 1 using plot "file.txt" w boxes I would expect that at the x value of 3 it will go to a value of 0 for y... but it doesn't. Is there a way to fix that, or do I actually have to type by hand an... (1 Reply)
Discussion started by: cosmologist
1 Replies

5. Shell Programming and Scripting

placeholder in gnuplot data

My input data has occasional holes in it, spots where a sensor couldn't be read. These are ERR in the data file instead of a floating point number. What should I change them to, for gnuplot to ignore these values instead of whining about them? (1 Reply)
Discussion started by: Corona688
1 Replies

6. UNIX for Dummies Questions & Answers

gnuplot: map view with black and white for 0/1 in the 3rd column

Hi, I am using gnuplot to plot a 3D plot with "set view map". My data looks like ====== X Y Z ====== 100 200 0 200 300 1 200 200 0 . . . The third column only has either 0 or 1. How do I generate a map view plot that will have black (white) for 0 (1)? Thanks, Gaurab (0 Replies)
Discussion started by: gaurab
0 Replies

7. Shell Programming and Scripting

Gnuplot Time Data Question

I have a data file of the following format: servername,2013-05-11 17:46:03,SomeText,195,195,11,202 servername,2013-05-11 17:47:03,SomeText,192,192,23,103 servername,2013-05-11 17:48:03,SomeText,189,190,14,117 servername,2013-05-11 17:49:03,SomeText,196,195,24,231 ... ... I want to... (0 Replies)
Discussion started by: BeeryM
0 Replies

8. Shell Programming and Scripting

Gnuplot question

Hi! Let's say I have these two columns in file.txt 0 1 1 5 2 10 3 15 4 20 5 25 in gnuplot, i would plot usingplot 'file.txt' u 1:2 If I wanted to add a label to the y-axis I would useset label "Ef" at 0.0,7.0 However, I want the label Ef to be on the otherside of the y-axis. Not... (0 Replies)
Discussion started by: sidiq1983
0 Replies

9. Shell Programming and Scripting

Fun with terminal plotting JSON data at the command line

One of the great thing about unix is the ability to pipe multiple programs together to manipulate data. Plain, unstructured text is the most common type of data that is passed between programs, but these days JSON is becoming more popular. I thought it would be fun to pipe together some command... (1 Reply)
Discussion started by: kbrazil
1 Replies
restorepalette(1)						Svgalib User Manual						 restorepalette(1)

NAME
restorepalette - set the color palette for textmode. SYNOPSIS
restorepalette [filename] DESCRIPTION
restorepalette without arguments sets the standard VGA palette. This can be useful if it is somehow messed up. With a filename argument a custom palette can be loaded (feature added by Charles Blake <chuckb@alice.wonderland.caltech.edu>). This allow a user to set up a file that looks like this one (These color map definitions are the same as the default VGA ones. Alter to suite personal tastes). The first column contains the number of the color to set, then follow three integers in range 0 - 63 (lowest to highest intensity) for red, green, blue. 0 0 0 0 # black 1 0 0 42 # blue 2 0 42 0 # green 3 0 42 42 # cyan 4 42 0 0 # red 5 42 0 42 # magenta 6 42 21 0 # brown 7 42 42 42 # white 8 21 21 21 # bright black 9 21 21 63 # bright blue 10 21 63 21 # bright green 11 21 63 63 # bright cyan 12 63 21 21 # bright red 13 63 21 63 # bright magenta 14 63 63 21 # bright brown 15 63 63 63 # bright white The inline comments are the only kind of allowed, as I use a little fscanf(3) trick to get them. Blank lines are ok, but not pure comment lines. See the comments in my code, also. This allows people to set up custom palettes for use in virtual console text modes. I use it all the time. When combined with a color-syn- tax editor like jed-0.97+ or color-ls, etc., being able to choose your own text-mode palette is quite a bonus. I set mine up via restorepalette /etc/palette in my /etc/rc. If the program is given the correct permissions, then individual users can have restorepalette ~/.palette or some such thing in their shell startup files. Of course, it shouldn't be done when starting remote shells or when under X, so some kind of test that TERM is a virtual console is needed for that case. SEE ALSO
svgalib(7), vgagl(7), libvga.config(5), vga_setpalvec(3), dumpreg(1), convfont(1), fix132x43(1), restorefont(1), restoretextmode(1), runx(1), savetextmode(1), setmclk(1), textmode(1). AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced utility as well as of the original documentation is unknown. It is very likely that both are at least to some extent are due to Harm Hanemaayer <H.Hanemaayer@inter.nl.net>. Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections to this first version of the svgalib manual. Svgalib (>;= 1.2.11) 2 Aug 1997 restorepalette(1)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy