[prev in list] [next in list] [prev in thread] [next in thread]
List: gnuplot-info
Subject: Re: [Gnuplot-info] how to ignore missing lines ? (not sure of
From: Thomas Sefzick <t.sefzick () fz-juelich ! de>
Date: 2011-03-08 10:57:18
Message-ID: 31096093.post () talk ! nabble ! com
[Download RAW message or body]
"$0" is the line number and has nothing to do with the data,
the matching (or missing) entries are in "$1".
on a unix-like system combine the 3 files:
join -t ',' -a 1 C.csv A.csv | join -t ',' -a 1 - B.csv > X.csv
(on a windows system install the 'coreutils' to use the 'join' command)
and then plot using the new file:
plot "X.csv" using 0:2:xticlabels(1) with linespoints title "C", \
"" using 0:4 with linespoints title "A", \
"" using 0:6 with linespoints title "B"
or without connections across gaps:
plot "X.csv" using 0:2:xticlabels(1) with linespoints title "C", \
"" using 0:($4) with linespoints title "A", \
"" using 0:($6) with linespoints title "B"
m.shankar.m wrote:
>
> Thank you Thomas.
> The .csv files I provied did not sufficiently cover the problem scenario.
> The data lines in between are also missing (new .csv below).
>
> ## file A.csv
> File,LOC,SLOC-P
> ./\CCComponent.cpp,1859,1823
> ./\IAlarmComponent.cpp,815,783
> ./\TCIInterface.h,112,48
>
> ## file B.csv
> File,LOC,SLOC-P
> ./\CCComponent.cpp,2360,1795
> ./\IAlarmComponent.cpp,960,771
> ./\TCIInterface.h,102,58
>
> ## file C.csv
> File,LOC,SLOC-P
> ./\AlarmSystemComponent.cpp,527,461
> ./\CCComponent.cpp,2353,1791
> ./\IAlarmComponent.cpp,950,771
> ./\SCIInterface.h,78,35
> ./\TCIComponent.h,22,13
> ./\TCIInterface.h,112,48
>
> Is there a generic solution to skip lines with unmatch $0 data? I do not
> have control over the .csv file format since it is automatically produced
> and would like to limit post processing it to add datamissing notations,
> etc.
>
> Thanks again.
> Shankar
>
>
> Thomas Sefzick wrote:
> >
> > plot \
> > "A.csv" using ($0+1):2 w linespoints title "A", \
> > "B.csv" using ($0+1):2 w linespoints title "B", \
> > "C.csv" using 0:2:xticlabels(1) w linespoints title "C"
> >
> >
> > m.shankar.m wrote:
> > >
> > > hello,
> > >
> > > I have following situation.
> > > http://old.nabble.com/file/p31089202/plot.zip Download files : plot.zip
> > >
> > > ## file A.csv
> > > File,LOC,SLOC-P,SLOC-L
> > > ./\CCComponent.cpp,1859,1823
> > > ./\IAlarmComponent.cpp,815,783
> > >
> > > ## file B.csv
> > > File,LOC,SLOC-P,SLOC-L
> > > ./\CCComponent.cpp,2360,1795
> > > ./\IAlarmComponent.cpp,960,771
> > >
> > > ## file C.csv
> > > File,LOC,SLOC-P
> > > ./\AlarmSystemComponent.cpp,527,461
> > > ./\CCComponent.cpp,2353,1791
> > > ./\IAlarmComponent.cpp,950,771
> > >
> > > ## file test.plt
> > > set terminal svg
> > > set output "test.svg"
> > > set datafile separator ','
> > > plot "A.csv" using 0:2:xticlabels(1) w linespoints title "A", \
> > > "B.csv" using 0:2:xticlabels(1) w linespoints title "B", \
> > > "C.csv" using 0:2:xticlabels(1) w linespoints title "C"
> > > reset
> > >
> > > The output "test.svg" plots correct data, but at incorrect x-axis
> > > location. For example, for point "./\AlarmSystemComponent.cpp", I expect
> > > only one data point.
> > >
> > > Any thoughts? Thank you in advance.
> > >
> > > Shankar
> > >
> > >
> >
> >
>
>
--
View this message in context: \
http://old.nabble.com/how-to-ignore-missing-lines---%28not-sure-of-proper-title-for-this%29-tp31089202p31096093.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
gnuplot-info mailing list
gnuplot-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-info
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic