Sponsored Content
Top Forums Shell Programming and Scripting GnuPlot-area marked by filledcurve Post 302643621 by bakunin on Sunday 20th of May 2012 05:14:34 AM
Old 05-20-2012
I don't know if the following code is meant to be GNUplot-internal commands or shell commands. I don't use GNUplot. If it is the former the thread should be transferred to Unix and Linux Applications/ as it is applications-related.

As long as i don't know i will treat the following as shell code.

Quote:
Originally Posted by IMPe
Code:
#Sektor Inden --> Anfang <--> Ende
SIa(x)=212
[....]
plot 'PATH/mete.txt' using 1:3 t 'WR' w l lt 3 lw 1 lc rgbcolor "#0000ff", \
    SIa(x) w l lt 3 lw 1 lc rgbcolor "#800080",\
    SIe(x) w l lt 3 lw 1 lc rgbcolor "#800080",\
    SHa(x) w filledcurve above y1=64 l lt 3 lw 1 lc rgbcolor "#800080",\
    SHe(x) w filledcurve below y1=122 l lt 3 lw 1 lc rgbcolor "#800080"

The first line is faulty because shell variables can't be named that way and "SIa(x)" is not a valid name. Have a look at the man page of the shell you are using (most likely man ksh or man bash) abount which characters are allowed and which aren't.

The second line uses (again!) variables without expanding them, as you have been told already in this thread.

If you want to use arrays (which is possible in ksh) you have to do it this way:

Code:
var[1]="abc"             # definition
var[2]="def"
var[3]="ghi"

echo ${var[1]}           # usage 1 - fixed indexes
echo ${var[2]}
string="${var[1]}${var[2]}"

i=1                      # usage 2 - indexed by a variable
while [ $i -le 3 ] ; do
      echo ${var[$i]}
     (( i += 1 ))
done

# specialities: handle the complete array

number_of_elements=${#var[*]}
echo $number_of_elements

echo "print whole arrays content: " ${var[@]}
echo "print whole arrays content: " ${var[*]}

I hope this helps.

bakunin
 

7 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Moderators area?

. (1 Reply)
Discussion started by: Driver
1 Replies

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

3. UNIX for Dummies Questions & Answers

file marked unretrievable

Hi When i try to ftp download a file from a Solaris 10 server, it returns the error "is marked unretrievable" how can i get around this to download the file? (2 Replies)
Discussion started by: arielgoldberg
2 Replies

4. SuSE

SLES11 - RAID6 all disks marked as Spare

Hello, After a replacement of the motherboard of my server, all disks belonging to a raid6 are now marked as spare. Is there any way to mark those disks as active and restore the raid6? $ cat /proc/mdstat Personalities : md1 : inactive sda1(S) sdk1(S) sdj1(S) sdi1(S) sdh1(S)... (0 Replies)
Discussion started by: xavix
0 Replies

5. UNIX for Dummies Questions & Answers

Area of a square

I am just starting out with bash scripting. I tried a simple script to find the area of a square and it didnt run. #!/bin/bash #script to find area of a square based on user input if then echo " Usage -$0 x " echo " where x is the dimension of the square " exit 1 n1=$1 ... (2 Replies)
Discussion started by: SnydeMz
2 Replies

6. UNIX for Advanced & Expert Users

Superblock marked dirty

Good morning! I met a problem on a FS with AIX 5.3 It's not possible to mount the FS because of a dirty superblock. I tried few things without success. I need your help to solve my problem guys. Do you have any idea please? Thanks a lot drp01,/home/root # mount /GSPRES/data Replaying... (9 Replies)
Discussion started by: Castelior
9 Replies

7. Web Development

Mysql table is marked as crashed and should be repaired

140312 13:43:54 /usr/libexec/mysqld: Table './***/phpbb_posts' is marked as crashed and should be repaired Its mysqld.log in var/log alot of messages, but before around hour i tried to "repaid table" from within phpmyadmin, but appears it has no effect.. why? How to fix? (1 Reply)
Discussion started by: postcd
1 Replies
XClearArea(3X11)						     MIT X11R4							  XClearArea(3X11)

Name
       XClearArea, XClearWindow - clear area or window

Syntax
       XClearArea(display, w, x, y, width, height, exposures)
	  Display *display;
	  Window w;
	  int x, y;
	  unsigned int width, height;
	  Bool exposures;

       XClearWindow(display, w)
	  Display *display;
	  Window w;

Arguments
       display	 Specifies the connection to the X server.

       exposures Specifies a Boolean value that indicates if events are to be generated.

       w	 Specifies the window.

       width
       height	 Specify the width and height, which are the dimensions of the rectangle.

       x
       y	 Specify the x and y coordinates, which are relative to the origin of the window and specify the upper-left corner of the rectan-
		 gle.

Description
       The function paints a rectangular area in the specified window according to the specified dimensions with the window's background pixel or
       pixmap.	The subwindow-mode effectively is If width is zero, it is replaced with the current width of the window minus x.  If height is
       zero, it is replaced with the current height of the window minus y.  If the window has a defined background tile, the rectangle clipped by
       any children is filled with this tile.  If the window has background the contents of the window are not changed.  In either case, if expo-
       sures is one or more events are generated for regions of the rectangle that are either visible or are being retained in a backing store.
       If you specify a window whose class is a error results.

       can generate and errors.

       The function clears the entire area in the specified window and is equivalent to (display, w, 0, 0, 0, 0, If the window has a defined back-
       ground tile, the rectangle is tiled with a plane-mask of all ones and function.	If the window has background the contents of the window
       are not changed.  If you specify a window whose class is a error results.

       can generate and errors.

Diagnostics
       An	 window is used as a Drawable.

       Some numeric value falls outside the range of values accepted by the request.
		 Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument
		 defined as a set of alternatives can generate this error.

       A value for a Window argument does not name a defined Window.

See Also
       XCopyArea(3X11)
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

																  XClearArea(3X11)
All times are GMT -4. The time now is 05:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy