Sponsored Content
Full Discussion: gnuplot trouble
Special Forums UNIX and Linux Applications gnuplot trouble Post 302549332 by kingnothing on Monday 22nd of August 2011 04:48:38 PM
Old 08-22-2011
gnuplot trouble

I am having a bit of trouble plotting a histogram in gnuplot. I am trying to use it to draw bars side by side. The first bar is from column five in my data file. The second bar is actually three bars stacked on top of each other and should be as tall as the first bar. The data is from the 2nd, 3rd, and 4th column of the same data file.

Code:
#   GPLOT.PL pseudo commands for GNUPLOT"
## IF TYPE eq ps   set terminal postscript landscape color
## IF TYPE eq eps  set terminal postscript eps color
set terminal png xFFFFDD size 1280,800
## IF TYPE eq png  set terminal png
## IF TYPE eq pbm  set terminal pbm
set output "bars.png"
set xlabel "Date"
set ylabel "Gigabytes"
set multiplot
set autoscale
set border 3
set yrange [0:70000]
set xtics border nomirror rotate
set xtics ("8/22/2011" 8/22/2011, "8/23/2011" 8/23/2011)
set ytics border nomirror
set origin 0.0,0.0
set title "BARCHART"
set style data histogram
set style histogram rows
set style fill solid 1.00 border -1
set boxwidth 0.9
plot "graphdata.rpt" u 5 t "Column 5" lc rgb "#FFD300"
plot '' u 2 t "Column 2", '' u 3 t "Column 3", '' u 4 t "Column 4"


When I plot this, all I can see is the three stacked bars. I used xtics to offset the graph, and I could see the column 5 bar graph was behind it. So, it seems that they are sitting on top of each other. Does anyone know how to fix it so they will be side by side? Thanks!

Moderator's Comments:
Mod Comment Please use [CODE] tags when posting listings and the like

Last edited by pludi; 08-22-2011 at 06:13 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with gnuplot

Hi, I am a beginner using UNIX, and was wondering how to use gnuplot from UNIX on my pc. I am connected remotely to my work's UNIX server using Secure Shell Client, and gnuplot won't open a new window when I use the plot command. How do I do this? Moreover, is it possible to save things from the... (0 Replies)
Discussion started by: KTTFB64
0 Replies

2. UNIX and Linux Applications

GNUplot

Hi, I am trying to make a plot of an ASCII file using GNUplot, but I keep getting error msg: for example plot filename.txt It says that (.txt ) is not identified ... I tried to write it without the .txt part, but I also get the error msg. Any idea why? :confused: (1 Reply)
Discussion started by: cosmologist
1 Replies

3. Shell Programming and Scripting

xargs and gnuplot

Hi All, Seems I have an xargs stdin problem that I don't understand. I have a script (call it myscript.sh) that takes the names of one or more file(s) specified on the command line and creates a single gnuplot command file containing multiple records, one for each specified file. Each of... (9 Replies)
Discussion started by: paulianna2002
9 Replies

4. Shell Programming and Scripting

gnuplot horizontal

simple question I thought. How do I setup a chart in gnuplot that draws a "upper threshold" for a given set of data. I have the graph charting fine. I have peaks and valleys. I can either setup a number that I want to be the "upper threshold". a horizontal line based either in the data,... (5 Replies)
Discussion started by: kag3ythree
5 Replies

5. UNIX for Dummies Questions & Answers

GNUPLOT problem

Hi, Im trying to plot a time series with gnuplot. this is my script set xdata time set yrange set timefmt "%H" set xrange set format x "%H:%M:%S" plot "time_vs_times.txt" using 1:2 title 'Interarrival time' with points lw 2 and this is my data 11:14:18 5 11:14:19 10... (10 Replies)
Discussion started by: jamie_123
10 Replies

6. Shell Programming and Scripting

Gnuplot command

My data input looks like this: -16.25 -38.75 9.69094 -16.25 -36.25 10.0594 -16.25 -33.75 10.3884 -16.25 -31.25 10.6653 -16.25 -28.75 10.7947 -16.25 -26.25 10.8838 -16.25 -23.75 10.8463 -16.25 -21.25 10.8131 -16.25 -18.75 10.7509 -16.25 -16.25 10.6581 -16.25 -13.75 10.6859 -16.25... (0 Replies)
Discussion started by: programmerc
0 Replies

7. 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

8. Shell Programming and Scripting

Gnuplot 3d binning

Hello I have a text file with tens of thousands of rows The format is x y where both x and y can be anything between -100 and +100. What I would like to do is have a 3d gnuplot where there are 10,000 squared or bins and each bin will count how many rows have a value that would be... (1 Reply)
Discussion started by: garethsays
1 Replies

9. Shell Programming and Scripting

Gnuplot script

Need assistance in getting a script right. It requires little tweaking and I am not getting it right . Using below data and the below script it creates a table with png file but regarding the time it create 6,7,8 and i want each time 6:15 ,6:30 and so on So that i can view the exact graph... (3 Replies)
Discussion started by: ajayram_arya
3 Replies
PLOT(3X)																  PLOT(3X)

NAME
plot: openpl et al. - graphics interface SYNOPSIS
openpl( ) erase( ) label(s) char s[ ]; line(x1, y1, x2, y2) circle(x, y, r) arc(x, y, x0, y0, x1, y1) move(x, y) cont(x, y) point(x, y) linemod(s) char s[ ]; space(x0, y0, x1, y1) closepl( ) DESCRIPTION
These subroutines generate graphic output in a relatively device-independent manner. See plot(5) for a description of their effect. Openpl must be used before any of the others to open the device for writing. Closepl flushes the output. String arguments to label and linemod are null-terminated, and do not contain newlines. Various flavors of these functions exist for different output devices. They are obtained by the following ld(1) options: -lplot device-independent graphics stream on standard output for plot(1) filters -l300 GSI 300 terminal -l300s GSI 300S terminal -l450 DASI 450 terminal -l4014 Tektronix 4014 terminal SEE ALSO
plot(5), plot(1), graph(1) PLOT(3X)
All times are GMT -4. The time now is 11:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy