Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1913 > unrolled thread

Please help - plot image not working

Started bySree <sreejithpk@gmail.com>
First post2013-06-25 02:27 -0700
Last post2013-07-04 02:25 -0700
Articles 9 — 3 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  Please help - plot image not working Sree <sreejithpk@gmail.com> - 2013-06-25 02:27 -0700
    Re: Please help - plot image not working Sree <sreejithpk@gmail.com> - 2013-06-25 19:59 -0700
    Re: Please help - plot image not working Sree <sreejithpk@gmail.com> - 2013-06-25 20:53 -0700
      Re: Please help - plot image not working Karl <mail.kfr@gmx.net> - 2013-06-26 07:49 +0200
    Re: Please help - plot image not working Sree <sreejithpk@gmail.com> - 2013-06-26 00:15 -0700
      Re: Please help - plot image not working Karl <mail.kfr@gmx.net> - 2013-06-27 07:27 +0200
    Re: Please help - plot image not working Sree <sreejithpk@gmail.com> - 2013-07-02 23:39 -0700
      Re: Please help - plot image not working Christoph Bersch <usenet@bersch.net> - 2013-07-03 09:21 +0200
        Re: Please help - plot image not working Sree <sreejithpk@gmail.com> - 2013-07-04 02:25 -0700

#1913 — Please help - plot image not working

FromSree <sreejithpk@gmail.com>
Date2013-06-25 02:27 -0700
SubjectPlease help - plot image not working
Message-ID<e748d557-b03b-48de-b031-d3b52eedf0ce@googlegroups.com>
Hello group,


I have a data matrix in a file. The data is comma separated and looks like (i do not know how to attach a file to the post):

32.71615219116211,32.35625839233398,31.498046875,30.73119926452637,30.77080345153809,31.56380462646484,32.03682327270508,33.60488128662109,33.0875358581543,33.42950439453125,32.52166366577148,33.06188201904297,33.81738662719727,33.58745956420898,33.51096343994141,32.37562942504883,32.29684448242188,31.98270416259766,32.52191543579102,32.67719268798828,32.59981536865234,32.91101837158203,33.16838073730469,32.82643508911133,31.57819938659668,31.00910568237305,31.31731414794922,29.89642333984375,32.47930908203125,32.2718505859375,33.17678833007812,32.15474700927734,33.08844375610352,-inf,-inf,-inf
34.66389846801758,34.15962982177734,33.09500503540039,31.83910942077637,31.35856437683105,32.72917175292969,33.30414199829102,34.22311401367188,33.47836303710938,32.94600677490234,33.19053268432617,34.06565093994141,34.55643081665039,34.12158203125,34.16344833374023,33.06776809692383,33.35759353637695,32.38563919067383,32.79897308349609,32.89970397949219,33.78991317749023,32.83514785766602,32.41145324707031,32.71649169921875,31.50583457946777,31.1647777557373,31.491943359375,30.10324096679688,32.18594360351562,32.05590057373047,31.88617134094238,31.39592742919922,31.54354286193848,31.09903907775879,32.32763290405273,33.10724258422852,34.64406585693359,35.16285705566406,32.22066 .....
.......


I am trying to plot an image with the following command:

gnuplot> set datafile separator ','
gnuplot> plot 'data.txt' matrix using (0+column(1)*1.6384):(-6.0+column(2)*6.256021):(column(3)) with image


but it is producing an empty plot with the warning:

warning: Image grid must be at least 2 x 2.
warning: Image grid must be at least 2 x 2.


the same data, i tried to plot in a different computer (computer 2) and then it works fine with same set of commands. My question is what is going wrong in the first case. is it the gnuplot version or something else. 
The following is the gnuplot versions.

where the plot command doesn't work (computer 1):
gnuplot> show version long

        G N U P L O T
        Version 4.6 patchlevel 3    last modified 2013-04-12
        Build System: Linux x86_64

        Copyright (C) 1986-1993, 1998, 2004, 2007-2013
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')
Compile options:
-READLINE  +LIBREADLINE  +HISTORY
-BACKWARDS_COMPATIBILITY  +BINARY_DATA
+GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION
-USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE
+DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS

GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.6"
GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.6/PostScript"
HELPFILE           = "/usr/local/share/gnuplot/4.6/gnuplot.gih"

Computer 1: Red Hat Enterprise Linux Server release 6.3 (Santiago)




where I can plot the image with the same commands (computer 2)
gnuplot> show version long

    G N U P L O T
    Version 4.7 patchlevel 0    last modified 2013-05-12

    Copyright (C) 1986-1993, 1998, 2004, 2007-2012
    Thomas Williams, Colin Kelley and many others

    gnuplot home:     http://www.gnuplot.info
    mailing list:     gnuplot-beta@lists.sourceforge.net
    faq, bugs, etc:   type "help FAQ"
    immediate help:   type "help"  (plot window: hit 'h')
Compile options:
+READLINE  -LIBREADLINE  +HISTORY 
-BACKWARDS_COMPATIBILITY  +BINARY_DATA 
+GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION 
-USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE 
+DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS

GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.7"
GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.7/PostScript"
HELPFILE           = "/usr/local/share/gnuplot/4.7/gnuplot.gih"

Computer 2: Ubuntu 12.04.2 LTS

Any help is appreciated.
Thanks
Sree

[toc] | [next] | [standalone]


#1917

FromSree <sreejithpk@gmail.com>
Date2013-06-25 19:59 -0700
Message-ID<e5701916-2d6d-4112-bb54-c1368d9ad1f4@googlegroups.com>
In reply to#1913
On Tuesday, June 25, 2013 12:27:42 PM UTC+3, Sree wrote:
> Hello group,
> 
> 
> 
> 
> 
> I have a data matrix in a file. The data is comma separated and looks like (i do not know how to attach a file to the post):
> 
> 
> 
> 32.71615219116211,32.35625839233398,31.498046875,30.73119926452637,30.77080345153809,31.56380462646484,32.03682327270508,33.60488128662109,33.0875358581543,33.42950439453125,32.52166366577148,33.06188201904297,33.81738662719727,33.58745956420898,33.51096343994141,32.37562942504883,32.29684448242188,31.98270416259766,32.52191543579102,32.67719268798828,32.59981536865234,32.91101837158203,33.16838073730469,32.82643508911133,31.57819938659668,31.00910568237305,31.31731414794922,29.89642333984375,32.47930908203125,32.2718505859375,33.17678833007812,32.15474700927734,33.08844375610352,-inf,-inf,-inf
> 
> 34.66389846801758,34.15962982177734,33.09500503540039,31.83910942077637,31.35856437683105,32.72917175292969,33.30414199829102,34.22311401367188,33.47836303710938,32.94600677490234,33.19053268432617,34.06565093994141,34.55643081665039,34.12158203125,34.16344833374023,33.06776809692383,33.35759353637695,32.38563919067383,32.79897308349609,32.89970397949219,33.78991317749023,32.83514785766602,32.41145324707031,32.71649169921875,31.50583457946777,31.1647777557373,31.491943359375,30.10324096679688,32.18594360351562,32.05590057373047,31.88617134094238,31.39592742919922,31.54354286193848,31.09903907775879,32.32763290405273,33.10724258422852,34.64406585693359,35.16285705566406,32.22066 .....
> 
> .......
> 
> 
> 
> 
> 
> I am trying to plot an image with the following command:
> 
> 
> 
> gnuplot> set datafile separator ','
> 
> gnuplot> plot 'data.txt' matrix using (0+column(1)*1.6384):(-6.0+column(2)*6.256021):(column(3)) with image
> 
> 
> 
> 
> 
> but it is producing an empty plot with the warning:
> 
> 
> 
> warning: Image grid must be at least 2 x 2.
> 
> warning: Image grid must be at least 2 x 2.
> 
> 
> 
> 
> 
> the same data, i tried to plot in a different computer (computer 2) and then it works fine with same set of commands. My question is what is going wrong in the first case. is it the gnuplot version or something else. 
> 
> The following is the gnuplot versions.
> 
> 
> 
> where the plot command doesn't work (computer 1):
> 
> gnuplot> show version long
> 
> 
> 
>         G N U P L O T
> 
>         Version 4.6 patchlevel 3    last modified 2013-04-12
> 
>         Build System: Linux x86_64
> 
> 
> 
>         Copyright (C) 1986-1993, 1998, 2004, 2007-2013
> 
>         Thomas Williams, Colin Kelley and many others
> 
> 
> 
>         gnuplot home:     http://www.gnuplot.info
> 
>         faq, bugs, etc:   type "help FAQ"
> 
>         immediate help:   type "help"  (plot window: hit 'h')
> 
> Compile options:
> 
> -READLINE  +LIBREADLINE  +HISTORY
> 
> -BACKWARDS_COMPATIBILITY  +BINARY_DATA
> 
> +GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION
> 
> -USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE
> 
> +DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS
> 
> 
> 
> GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.6"
> 
> GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.6/PostScript"
> 
> HELPFILE           = "/usr/local/share/gnuplot/4.6/gnuplot.gih"
> 
> 
> 
> Computer 1: Red Hat Enterprise Linux Server release 6.3 (Santiago)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> where I can plot the image with the same commands (computer 2)
> 
> gnuplot> show version long
> 
> 
> 
>     G N U P L O T
> 
>     Version 4.7 patchlevel 0    last modified 2013-05-12
> 
> 
> 
>     Copyright (C) 1986-1993, 1998, 2004, 2007-2012
> 
>     Thomas Williams, Colin Kelley and many others
> 
> 
> 
>     gnuplot home:     http://www.gnuplot.info
> 
>     mailing list:     gnuplot-beta@lists.sourceforge.net
> 
>     faq, bugs, etc:   type "help FAQ"
> 
>     immediate help:   type "help"  (plot window: hit 'h')
> 
> Compile options:
> 
> +READLINE  -LIBREADLINE  +HISTORY 
> 
> -BACKWARDS_COMPATIBILITY  +BINARY_DATA 
> 
> +GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION 
> 
> -USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE 
> 
> +DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS
> 
> 
> 
> GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.7"
> 
> GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.7/PostScript"
> 
> HELPFILE           = "/usr/local/share/gnuplot/4.7/gnuplot.gih"
> 
> 
> 
> Computer 2: Ubuntu 12.04.2 LTS
> 
> 
> 
> Any help is appreciated.
> 
> Thanks
> 
> Sree

Dear all,
Any hints or pointers to find what is causing this issue?

[toc] | [prev] | [next] | [standalone]


#1918

FromSree <sreejithpk@gmail.com>
Date2013-06-25 20:53 -0700
Message-ID<732cae3a-d6c5-4ec0-bed8-5fce5e17eca4@googlegroups.com>
In reply to#1913
On Tuesday, June 25, 2013 12:27:42 PM UTC+3, Sree wrote:
> Hello group,
> 
> 
> 
> 
> 
> I have a data matrix in a file. The data is comma separated and looks like (i do not know how to attach a file to the post):
> 
> 
> 
> 32.71615219116211,32.35625839233398,31.498046875,30.73119926452637,30.77080345153809,31.56380462646484,32.03682327270508,33.60488128662109,33.0875358581543,33.42950439453125,32.52166366577148,33.06188201904297,33.81738662719727,33.58745956420898,33.51096343994141,32.37562942504883,32.29684448242188,31.98270416259766,32.52191543579102,32.67719268798828,32.59981536865234,32.91101837158203,33.16838073730469,32.82643508911133,31.57819938659668,31.00910568237305,31.31731414794922,29.89642333984375,32.47930908203125,32.2718505859375,33.17678833007812,32.15474700927734,33.08844375610352,-inf,-inf,-inf
> 
> 34.66389846801758,34.15962982177734,33.09500503540039,31.83910942077637,31.35856437683105,32.72917175292969,33.30414199829102,34.22311401367188,33.47836303710938,32.94600677490234,33.19053268432617,34.06565093994141,34.55643081665039,34.12158203125,34.16344833374023,33.06776809692383,33.35759353637695,32.38563919067383,32.79897308349609,32.89970397949219,33.78991317749023,32.83514785766602,32.41145324707031,32.71649169921875,31.50583457946777,31.1647777557373,31.491943359375,30.10324096679688,32.18594360351562,32.05590057373047,31.88617134094238,31.39592742919922,31.54354286193848,31.09903907775879,32.32763290405273,33.10724258422852,34.64406585693359,35.16285705566406,32.22066 .....
> 
> .......
> 
> 
> 
> 
> 
> I am trying to plot an image with the following command:
> 
> 
> 
> gnuplot> set datafile separator ','
> 
> gnuplot> plot 'data.txt' matrix using (0+column(1)*1.6384):(-6.0+column(2)*6.256021):(column(3)) with image
> 
> 
> 
> 
> 
> but it is producing an empty plot with the warning:
> 
> 
> 
> warning: Image grid must be at least 2 x 2.
> 
> warning: Image grid must be at least 2 x 2.
> 
> 
> 
> 
> 
> the same data, i tried to plot in a different computer (computer 2) and then it works fine with same set of commands. My question is what is going wrong in the first case. is it the gnuplot version or something else. 
> 
> The following is the gnuplot versions.
> 
> 
> 
> where the plot command doesn't work (computer 1):
> 
> gnuplot> show version long
> 
> 
> 
>         G N U P L O T
> 
>         Version 4.6 patchlevel 3    last modified 2013-04-12
> 
>         Build System: Linux x86_64
> 
> 
> 
>         Copyright (C) 1986-1993, 1998, 2004, 2007-2013
> 
>         Thomas Williams, Colin Kelley and many others
> 
> 
> 
>         gnuplot home:     http://www.gnuplot.info
> 
>         faq, bugs, etc:   type "help FAQ"
> 
>         immediate help:   type "help"  (plot window: hit 'h')
> 
> Compile options:
> 
> -READLINE  +LIBREADLINE  +HISTORY
> 
> -BACKWARDS_COMPATIBILITY  +BINARY_DATA
> 
> +GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION
> 
> -USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE
> 
> +DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS
> 
> 
> 
> GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.6"
> 
> GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.6/PostScript"
> 
> HELPFILE           = "/usr/local/share/gnuplot/4.6/gnuplot.gih"
> 
> 
> 
> Computer 1: Red Hat Enterprise Linux Server release 6.3 (Santiago)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> where I can plot the image with the same commands (computer 2)
> 
> gnuplot> show version long
> 
> 
> 
>     G N U P L O T
> 
>     Version 4.7 patchlevel 0    last modified 2013-05-12
> 
> 
> 
>     Copyright (C) 1986-1993, 1998, 2004, 2007-2012
> 
>     Thomas Williams, Colin Kelley and many others
> 
> 
> 
>     gnuplot home:     http://www.gnuplot.info
> 
>     mailing list:     gnuplot-beta@lists.sourceforge.net
> 
>     faq, bugs, etc:   type "help FAQ"
> 
>     immediate help:   type "help"  (plot window: hit 'h')
> 
> Compile options:
> 
> +READLINE  -LIBREADLINE  +HISTORY 
> 
> -BACKWARDS_COMPATIBILITY  +BINARY_DATA 
> 
> +GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION 
> 
> -USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE 
> 
> +DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS
> 
> 
> 
> GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.7"
> 
> GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.7/PostScript"
> 
> HELPFILE           = "/usr/local/share/gnuplot/4.7/gnuplot.gih"
> 
> 
> 
> Computer 2: Ubuntu 12.04.2 LTS
> 
> 
> 
> Any help is appreciated.
> 
> Thanks
> 
> Sree


To investigate it further  I made a simple data1.txt, that now looks like this:

32.71615219116211,32.35625839233398,31.498046875,30.73119926452637,30.77080345153809,31.56380462646484,-inf,-inf
34.66389846801758,34.15962982177734,33.09500503540039,31.83910942077637,31.35856437683105,32.72917175292969,-inf,-inf
34.74748992919922,34.45933151245117,34.7545051574707,33.43788146972656,33.15143203735352,33.85923767089844,-inf,-inf
34.74748992919922,34.45933151245117,34.7545051574707,33.43788146972656,33.15143203735352,33.85923767089844,-inf,-inf

gnuplot> set datafile separator ','
gnuplot>  plot 'data1.txt' matrix using (column(1)):(column(2)):(column(3)) with image
warning: Image grid must be at least 2 x 2.
warning: Image grid must be at least 2 x 2.

but instead if i use the commands below, it is working and producing an image:
gnuplot> set datafile separator ','
gnuplot>  plot 'data1.txt' matrix using 1:2:3 with image

so what could be going wrong in the first case? perhaps the way the 'column' is used? any idea?

Thanks
Sree

[toc] | [prev] | [next] | [standalone]


#1919

FromKarl <mail.kfr@gmx.net>
Date2013-06-26 07:49 +0200
Message-ID<kqe6d9$bio$1@news.rz.uni-karlsruhe.de>
In reply to#1918
Am 26.06.2013 05:53, schrieb Sree:

> gnuplot>  plot 'data1.txt' matrix using (column(1)):(column(2)):(column(3)) with image

> gnuplot>  plot 'data1.txt' matrix using 1:2:3 with image
> 
> so what could be going wrong in the first case? perhaps the way the 'column' is used? any idea?

Both commands do work for me, as they should. Which gp version and build
are you using?

  Karl

[toc] | [prev] | [next] | [standalone]


#1920

FromSree <sreejithpk@gmail.com>
Date2013-06-26 00:15 -0700
Message-ID<f5502344-8521-4ba6-93a3-0311f113f48c@googlegroups.com>
In reply to#1913


On Wednesday, June 26, 2013 8:49:04 AM UTC+3, Karl wrote:

    Am 26.06.2013 05:53, schrieb Sree:

    > gnuplot>  plot 'data1.txt' matrix using (column(1)):(column(2)):(column(3)) with image

    > gnuplot>  plot 'data1.txt' matrix using 1:2:3 with image
    >
    > so what could be going wrong in the first case? perhaps the way the 'column' is used? any idea?

    > Both commands do work for me, as they should. Which gp version and build
    > are you using?





Hi Karl,
thanks for the reply. 
I am using gnuplot on a 64bit RH linux machine. 
gnuplot> show version long

        G N U P L O T
        Version 4.6 patchlevel 3    last modified 2013-04-12
        Build System: Linux x86_64

        Copyright (C) 1986-1993, 1998, 2004, 2007-2013
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')
Compile options:
-READLINE  +LIBREADLINE  +HISTORY
-BACKWARDS_COMPATIBILITY  +BINARY_DATA
+GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION
-USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE
+DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS

GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.6"
GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.6/PostScript"
HELPFILE           = "/usr/local/share/gnuplot/4.6/gnuplot.gih"


we have downloaded and installed build gnuplot-4.6.3.tar.gz  using configure,make, make install steps.


This is not working:

gnuplot> set datafile separator ','
gnuplot>  plot 'data1.txt' matrix using (column(1)):(column(2)):(column(3)) with image
         warning: Image grid must be at least 2 x 2.


         warning: Image grid must be at least 2 x 2.



BUT this is working:
gnuplot> plot 'data1.txt' matrix using ($1*.3+2):($2*.5+.1):3 w image

that is the problem is when using 'column'
perhaps a bug in 64bit mode? 

Thanks
Sree

[toc] | [prev] | [next] | [standalone]


#1922

FromKarl <mail.kfr@gmx.net>
Date2013-06-27 07:27 +0200
Message-ID<kqgpgc$cfg$1@news.rz.uni-karlsruhe.de>
In reply to#1920
Am 26.06.2013 09:15, schrieb Sree:

> gnuplot> set datafile separator ','
> gnuplot>  plot 'data1.txt' matrix using (column(1)):(column(2)):(column(3)) with image
>          warning: Image grid must be at least 2 x 2.
> 
> 
>          warning: Image grid must be at least 2 x 2.
> 
> 
> that is the problem is when using 'column'
> perhaps a bug in 64bit mode? 
> 

Does (column()) work at all on your 64bit build, eg. does


plot "-" using (column(1)):(column(2)) w l
1 1
3 3
e


plot a diagonal line? (The special filename "-" is for inline data, if
you haven´t seen that before.)

You should always boil down such problems to the simplest case. In most
cases, you than already find the problem (unless you´ve really found a
bug). ;-)

  Karl

[toc] | [prev] | [next] | [standalone]


#1930

FromSree <sreejithpk@gmail.com>
Date2013-07-02 23:39 -0700
Message-ID<d3c65b03-2d53-4afc-a3a4-9d52b2df87ec@googlegroups.com>
In reply to#1913
On Tuesday, June 25, 2013 12:27:42 PM UTC+3, Sree wrote:
> Hello group,
> 
> 
> 
> 
> 
> I have a data matrix in a file. The data is comma separated and looks like (i do not know how to attach a file to the post):
> 
> 
> 
> 32.71615219116211,32.35625839233398,31.498046875,30.73119926452637,30.77080345153809,31.56380462646484,32.03682327270508,33.60488128662109,33.0875358581543,33.42950439453125,32.52166366577148,33.06188201904297,33.81738662719727,33.58745956420898,33.51096343994141,32.37562942504883,32.29684448242188,31.98270416259766,32.52191543579102,32.67719268798828,32.59981536865234,32.91101837158203,33.16838073730469,32.82643508911133,31.57819938659668,31.00910568237305,31.31731414794922,29.89642333984375,32.47930908203125,32.2718505859375,33.17678833007812,32.15474700927734,33.08844375610352,-inf,-inf,-inf
> 
> 34.66389846801758,34.15962982177734,33.09500503540039,31.83910942077637,31.35856437683105,32.72917175292969,33.30414199829102,34.22311401367188,33.47836303710938,32.94600677490234,33.19053268432617,34.06565093994141,34.55643081665039,34.12158203125,34.16344833374023,33.06776809692383,33.35759353637695,32.38563919067383,32.79897308349609,32.89970397949219,33.78991317749023,32.83514785766602,32.41145324707031,32.71649169921875,31.50583457946777,31.1647777557373,31.491943359375,30.10324096679688,32.18594360351562,32.05590057373047,31.88617134094238,31.39592742919922,31.54354286193848,31.09903907775879,32.32763290405273,33.10724258422852,34.64406585693359,35.16285705566406,32.22066 .....
> 
> .......
> 
> 
> 
> 
> 
> I am trying to plot an image with the following command:
> 
> 
> 
> gnuplot> set datafile separator ','
> 
> gnuplot> plot 'data.txt' matrix using (0+column(1)*1.6384):(-6.0+column(2)*6.256021):(column(3)) with image
> 
> 
> 
> 
> 
> but it is producing an empty plot with the warning:
> 
> 
> 
> warning: Image grid must be at least 2 x 2.
> 
> warning: Image grid must be at least 2 x 2.
> 
> 
> 
> 
> 
> the same data, i tried to plot in a different computer (computer 2) and then it works fine with same set of commands. My question is what is going wrong in the first case. is it the gnuplot version or something else. 
> 
> The following is the gnuplot versions.
> 
> 
> 
> where the plot command doesn't work (computer 1):
> 
> gnuplot> show version long
> 
> 
> 
>         G N U P L O T
> 
>         Version 4.6 patchlevel 3    last modified 2013-04-12
> 
>         Build System: Linux x86_64
> 
> 
> 
>         Copyright (C) 1986-1993, 1998, 2004, 2007-2013
> 
>         Thomas Williams, Colin Kelley and many others
> 
> 
> 
>         gnuplot home:     http://www.gnuplot.info
> 
>         faq, bugs, etc:   type "help FAQ"
> 
>         immediate help:   type "help"  (plot window: hit 'h')
> 
> Compile options:
> 
> -READLINE  +LIBREADLINE  +HISTORY
> 
> -BACKWARDS_COMPATIBILITY  +BINARY_DATA
> 
> +GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION
> 
> -USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE
> 
> +DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS
> 
> 
> 
> GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.6"
> 
> GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.6/PostScript"
> 
> HELPFILE           = "/usr/local/share/gnuplot/4.6/gnuplot.gih"
> 
> 
> 
> Computer 1: Red Hat Enterprise Linux Server release 6.3 (Santiago)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> where I can plot the image with the same commands (computer 2)
> 
> gnuplot> show version long
> 
> 
> 
>     G N U P L O T
> 
>     Version 4.7 patchlevel 0    last modified 2013-05-12
> 
> 
> 
>     Copyright (C) 1986-1993, 1998, 2004, 2007-2012
> 
>     Thomas Williams, Colin Kelley and many others
> 
> 
> 
>     gnuplot home:     http://www.gnuplot.info
> 
>     mailing list:     gnuplot-beta@lists.sourceforge.net
> 
>     faq, bugs, etc:   type "help FAQ"
> 
>     immediate help:   type "help"  (plot window: hit 'h')
> 
> Compile options:
> 
> +READLINE  -LIBREADLINE  +HISTORY 
> 
> -BACKWARDS_COMPATIBILITY  +BINARY_DATA 
> 
> +GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION 
> 
> -USE_CWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE 
> 
> +DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE  +USER_LINETYPES +STATS
> 
> 
> 
> GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/4.7"
> 
> GNUPLOT_PS_DIR     = "/usr/local/share/gnuplot/4.7/PostScript"
> 
> HELPFILE           = "/usr/local/share/gnuplot/4.7/gnuplot.gih"
> 
> 
> 
> Computer 2: Ubuntu 12.04.2 LTS
> 
> 
> 
> Any help is appreciated.
> 
> Thanks
> 
> Sree


I tried the following and is working and plotting an image. so something is wrong when i use a file. any pointers? 

gnuplot> plot "-" matrix using  (column(1)):(column(2)):(column(3)) with image
input data ('e' ends) > 1 1 2 3
input data ('e' ends) > 2 3 5 6
input data ('e' ends) > 4 2 6 7
input data ('e' ends) > 8 2 4 5
input data ('e' ends) > e
input data ('e' ends) > e

the following is working too.

gnuplot> plot "-" matrix using  (column(1)):(column(2)):(column(3)) with image
input data ('e' ends) > 1,2,3,4
input data ('e' ends) > 5,4,6,6
input data ('e' ends) > 7,8,9,4
input data ('e' ends) > 3,4,5,6
input data ('e' ends) > e
input data ('e' ends) > e

what is not working is 

gnuplot> set datafile separator ','
gnuplot>  plot 'data1.txt' matrix using (column(1)):(column(2)):(column(3)) with image
         
warning: Image grid must be at least 2 x 2.
warning: Image grid must be at least 2 x 2.

where data1.txt is:
32.71615219116211,32.35625839233398,31.498046875,30.73119926452637,30.77080345153809,31.56380462646484,-inf,-inf
34.66389846801758,34.15962982177734,33.09500503540039,31.83910942077637,31.35856437683105,32.72917175292969,-inf,-inf
34.74748992919922,34.45933151245117,34.7545051574707,33.43788146972656,33.15143203735352,33.85923767089844,-inf,-inf
34.74748992919922,34.45933151245117,34.7545051574707,33.43788146972656,33.15143203735352,33.85923767089844,-inf,-inf

so my question is why plot is not working when using data1.txt ? what is wrong with the below command?
plot 'data1.txt' matrix using (column(1)):(column(2)):(column(3)) with image


Thanks
Sree

[toc] | [prev] | [next] | [standalone]


#1931

FromChristoph Bersch <usenet@bersch.net>
Date2013-07-03 09:21 +0200
Message-ID<kr0j3u$2na$1@dont-email.me>
In reply to#1930
Hi,

Am 03.07.2013 08:39, schrieb Sree:
>
> I tried the following and is working and plotting an image. so
> something is wrong when i use a file. any pointers?

I think the problem is probably the '-inf' entries in your datafiles 
together with the matrix option. With the data from your original post, 
I got the error 'Matrix does not represent a grid', because the '-inf' 
entries were ignored and the remaining matrix has rows of different length.
I do not have the time to investigate further, but this may be a 
starting point.

Christoph

[toc] | [prev] | [next] | [standalone]


#1932

FromSree <sreejithpk@gmail.com>
Date2013-07-04 02:25 -0700
Message-ID<0bcbbef3-31ed-448b-a1a9-23c59865ac60@googlegroups.com>
In reply to#1931
On Wednesday, July 3, 2013 10:21:46 AM UTC+3, Christoph Bersch wrote:
> Hi,
> 
> 
> 
> Am 03.07.2013 08:39, schrieb Sree:
> 
> >
> 
> > I tried the following and is working and plotting an image. so
> 
> > something is wrong when i use a file. any pointers?
> 
> 
> 
> I think the problem is probably the '-inf' entries in your datafiles 
> 
> together with the matrix option. With the data from your original post, 
> 
> I got the error 'Matrix does not represent a grid', because the '-inf' 
> 
> entries were ignored and the remaining matrix has rows of different length.
> 
> I do not have the time to investigate further, but this may be a 
> 
> starting point.
> 
> 
> 
> Christoph

Thanks Christoph. Yes, that -inf is the problem. instead of using (column(3)) simply using 3 works in that case. 
Thanks a lot
Sree

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web