You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(22) |
May
(52) |
Jun
(43) |
Jul
(36) |
Aug
(59) |
Sep
(37) |
Oct
(55) |
Nov
(39) |
Dec
(36) |
| 2005 |
Jan
(64) |
Feb
(40) |
Mar
(62) |
Apr
(58) |
May
(256) |
Jun
(77) |
Jul
(80) |
Aug
(39) |
Sep
(56) |
Oct
(36) |
Nov
(113) |
Dec
(68) |
| 2006 |
Jan
(43) |
Feb
(64) |
Mar
(69) |
Apr
(60) |
May
(71) |
Jun
(53) |
Jul
(63) |
Aug
(63) |
Sep
(76) |
Oct
(85) |
Nov
(82) |
Dec
(73) |
| 2007 |
Jan
(75) |
Feb
(82) |
Mar
(84) |
Apr
(104) |
May
(67) |
Jun
(101) |
Jul
(107) |
Aug
(138) |
Sep
(128) |
Oct
(106) |
Nov
(112) |
Dec
(112) |
| 2008 |
Jan
(94) |
Feb
(87) |
Mar
(146) |
Apr
(169) |
May
(75) |
Jun
(26) |
Jul
(26) |
Aug
(7) |
Sep
(18) |
Oct
(53) |
Nov
(42) |
Dec
(19) |
| 2009 |
Jan
(43) |
Feb
(39) |
Mar
(18) |
Apr
(45) |
May
(66) |
Jun
(87) |
Jul
(56) |
Aug
(41) |
Sep
(56) |
Oct
(139) |
Nov
(98) |
Dec
(88) |
| 2010 |
Jan
(81) |
Feb
(79) |
Mar
(83) |
Apr
(97) |
May
(124) |
Jun
(84) |
Jul
(53) |
Aug
(85) |
Sep
(89) |
Oct
(50) |
Nov
(98) |
Dec
(78) |
| 2011 |
Jan
(97) |
Feb
(74) |
Mar
(68) |
Apr
(54) |
May
(63) |
Jun
(59) |
Jul
(65) |
Aug
(58) |
Sep
(37) |
Oct
(40) |
Nov
(59) |
Dec
(35) |
| 2012 |
Jan
(16) |
Feb
(56) |
Mar
(63) |
Apr
(25) |
May
(48) |
Jun
(58) |
Jul
(20) |
Aug
(13) |
Sep
(43) |
Oct
(35) |
Nov
(20) |
Dec
(17) |
| 2013 |
Jan
(22) |
Feb
(11) |
Mar
(51) |
Apr
(34) |
May
(57) |
Jun
(27) |
Jul
(70) |
Aug
(30) |
Sep
(38) |
Oct
(53) |
Nov
(40) |
Dec
(25) |
| 2014 |
Jan
(26) |
Feb
(35) |
Mar
(60) |
Apr
(12) |
May
(17) |
Jun
(15) |
Jul
(9) |
Aug
(18) |
Sep
(46) |
Oct
(18) |
Nov
(19) |
Dec
(15) |
| 2015 |
Jan
(17) |
Feb
(28) |
Mar
(21) |
Apr
(54) |
May
(36) |
Jun
(8) |
Jul
(30) |
Aug
(13) |
Sep
(3) |
Oct
(28) |
Nov
(3) |
Dec
(3) |
| 2016 |
Jan
(11) |
Feb
(9) |
Mar
(29) |
Apr
(10) |
May
(8) |
Jun
(5) |
Jul
(50) |
Aug
(57) |
Sep
(13) |
Oct
(5) |
Nov
(17) |
Dec
(11) |
| 2017 |
Jan
(3) |
Feb
(23) |
Mar
(16) |
Apr
(7) |
May
(15) |
Jun
(12) |
Jul
(48) |
Aug
(15) |
Sep
(3) |
Oct
(20) |
Nov
(28) |
Dec
(21) |
| 2018 |
Jan
(13) |
Feb
(21) |
Mar
(21) |
Apr
(7) |
May
(3) |
Jun
(7) |
Jul
(27) |
Aug
(38) |
Sep
(4) |
Oct
(30) |
Nov
(22) |
Dec
|
| 2019 |
Jan
(5) |
Feb
(16) |
Mar
(1) |
Apr
(9) |
May
(7) |
Jun
(20) |
Jul
(13) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
(4) |
| 2020 |
Jan
(6) |
Feb
(11) |
Mar
(1) |
Apr
(18) |
May
(4) |
Jun
(5) |
Jul
(12) |
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
(17) |
| 2021 |
Jan
(1) |
Feb
(11) |
Mar
(16) |
Apr
(6) |
May
(5) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
(8) |
Oct
(10) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(9) |
Feb
(35) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(49) |
Jul
(11) |
Aug
|
Sep
(5) |
Oct
(2) |
Nov
(16) |
Dec
(13) |
| 2023 |
Jan
|
Feb
(8) |
Mar
(3) |
Apr
|
May
(8) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2024 |
Jan
(6) |
Feb
(9) |
Mar
|
Apr
(26) |
May
(24) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
(10) |
Nov
(9) |
Dec
|
| 2025 |
Jan
|
Feb
(22) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2026 |
Jan
|
Feb
(24) |
Mar
(20) |
Apr
(18) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
(6) |
Oct
(3) |
Nov
(2) |
Dec
|
|
From: Martin P. <ma...@po...> - 2017-11-13 08:55:33
|
Ah, that worked. Thanks a lot! I'll keep in mind to use pngcairo rather than png in the future. - Martin On Friday, November 10, 2017 8:54:41 PM CET theozh wrote: > sorry, I tested it in a wxt terminal. > > Obviously, it is different with png (btw I would use pngcairo terminal). > > Something with "set output". > Apparently, you have to set it twice (once again between the dummy plot and > the second plot command). Furthermore, you need to close your output with > "set output" at the end. > > The following should now really be working as all-in-one copy&paste code. |
|
From: theozh <th...@gm...> - 2017-11-10 19:54:46
|
sorry, I tested it in a wxt terminal. Obviously, it is different with png (btw I would use pngcairo terminal). Something with "set output". Apparently, you have to set it twice (once again between the dummy plot and the second plot command). Furthermore, you need to close your output with "set output" at the end. The following should now really be working as all-in-one copy&paste code. |
|
From: Martin P. <ma...@po...> - 2017-11-10 15:24:13
|
Thank you for your two suggestions! I have tried them both, and although I don't get any error message, the plots are empty. The plot in the first suggestion maintain the desired X range from 0 to 60, while the plot in the second example has a range from -0.5 to 2.5. The data has only been modified in the first suggestion; I replaced three line breaks by two line breaks, causing only a single empty line between data sets. Attached are the samples I tried with. Do our .g files differ? I run Version 5.2 patchlevel 0 last modified 2017-09-01 for the record. - Martin On fredag 3 november 2017 kl. 23:22:25 CET you wrote: > hi again, > it should work without changing your data with these lines: > > array XValue[3] > plot for [i=0:STATS_blocks-1] 'data.dat' index i using (XValue[i+1]=$1,1):1 > every 1:1:0:0:0:0 notitle plot for [i=0:STATS_blocks-1] 'data.dat' index i > using (XValue[i+1]):1 title columnheader(i + 1) |
|
From: Aleksey T. <ats...@gm...> - 2017-11-10 01:59:04
|
As a Web application owner, I wanted to graph the number of daily unique
visitors (out of my Apache httpd log) for the last six weeks.
My httpd log goes 5 months back (from July to November 2017) -- here it is
sorted by month:
# cat /var/cfengine/httpd/logs/access_log* | awk '/GET \/api\/user\//
{print $4, $7}'| cut -b2-12,22- | grep -v admin | sort -u | sort
-k2 -t/ -M | awk '{print $1}' | uniq -c | awk 'NR == 1 { print }
END { print }'
1 12/Jul/2017
2 09/Nov/2017
#
I tried the following:
set xdata time
set xtics rotate
set timefmt "%d/%b/%Y"
set format x "%d/%b/%Y"
set autoscale xfixmin
set autoscale xfix
# only show visitors for last 6 weeks (sliding window)
min=system("date -d '6 weeks ago' +%d/%h/%Y")
max=system("date -d 'now' +%d/%h/%Y")
set xrange [ "min" : "max"]
show xrange
plot '-' using 2:1 with lines
which generated:
line 0: illegal day of month
set xdata time
set xrange [ * : * ] noreverse nowriteback # (currently
["01/Jan/2000":"01/Jan/2000"] )
set autoscale xfixmin
set autoscale xfixmax
So then I took out the xrange stuff and instead just added "| tail -42" to
my one-liner:
cat /var/cfengine/httpd/logs/access_log* | awk '/GET \/api\/user\//
{print $4, $7}'| cut -b2-12,22- | grep -v admin | sort -u | sort
-k2 -t/ -M | awk '{print $1}' | uniq -c | tail -42
I can feed THAT into gnuplot and it does what I want, graphs the last six
months only. Yay! So I've solved my graphing needs, but I'd like to
understand the error message. What does 'line 0' mean? There is nothing
wrong with my input... What am I doing wrong with the gnuplot commands?
Love the tool, by the way. So powerful and useful!
Thanks!
Aleksey
|
|
From: theozh <th...@gm...> - 2017-11-03 22:22:40
|
hi again, it should work without changing your data with these lines: array XValue[3] plot for [i=0:STATS_blocks-1] 'data.dat' index i using (XValue[i+1]=$1,1):1 every 1:1:0:0:0:0 notitle plot for [i=0:STATS_blocks-1] 'data.dat' index i using (XValue[i+1]):1 title columnheader(i + 1) |
|
From: theozh <th...@gm...> - 2017-11-03 00:51:37
|
Hi Martin,
if you exchange your line:
plot for [i=0:(STATS_blocks - 1)] 'data.dat' index i using (50 + (i * 5)):1 title columnheader(i + 1)
by these lines:
array XValue[3]
plot for [i=1:3] 'data.dat' u 1:(XValue[i]=$1,1) every 1:1::(i-1)::(i-1) w p ls 1 not
plot for [i=1:3] 'data.dat' u (XValue[i]):1 every 1:1:1:(i-1)::(i-1) title sprintf("%g",XValue[i])
and if you change your data such there is only one empty line instead of two, you should get your desired result.
What it basically does is
- creating an array of XValues
- the first plot just extracts the first numbers of each datablock and writes them into the array
- the second plot command finally plots at the XValues from this array.
However, seems to work but not very elegant... maybe there is a smarter way...
Limitation:
in the for loop you can't use [i=1:STATS_block] for a variable number of blocks, because apparently STATS_blocks needs two empty data lines two count datablocks, whereas "every" only allows for one empty line.
See also my other question/post about datablock separation, which hopefully somebody can comment on.
Theo.
|
|
From: theozh <th...@gm...> - 2017-11-03 00:30:26
|
Hi,
I am confused with the separation of datablocks.
Apparently, the keyword "every" requires 1 (and not more) empty line for block separation,
whereas the function STATS_blocks requires 2 empty lines for block separation.
If you want to use both, STATS_blocks to count blocks and "every" to plot blocks this seems to contradict.
How can this be solved?
Below is a copy&paste gnuplot code to illustrate. I expected to get two identical plots, however, which is not the case. What have I missed? I am using Win7/64 gnuplot 5.2rc4.
Thank you for clarification.
### start gnuplot code
reset
$Data1 <<EOD
1
3
2
5
4
6
8
7
9
EOD
$Data2 <<EOD
1
3
2
5
4
6
8
7
9
EOD
set colorsequence classic
set multiplot layout 1,2
stats $Data1 using 1 nooutput
set label 1 sprintf("STATS blocks: %g",STATS_blocks) at graph 0.5,0.5
plot for [i=0:2] $Data1 using 0:1 every 1:1::i::i w lp ls i+1
stats $Data2 using 1 nooutput
set label 1 sprintf("STATS blocks: %g",STATS_blocks) at graph 0.5,0.5
plot for [i=0:2] $Data2 using 0:1 every 1:1::i::i w lp ls i+1
unset multiplot
### end gnuplot code
|
|
From: Martin P. <ma...@po...> - 2017-11-02 11:20:17
|
Hello, I am trying to plot multiple sets of data with the boxplot style. All sets of data have their unique X axis value. In my small example, I have got it to work for X = 50, X = 55 and X = 60 in the same plot. However, I am not quite satisfied with the solution. >From boxplot.g.txt, this is the part where the X values are determined: index i using (50 + (i * 5)):1 As you can see, the X value is calculated based on the index of the set in the data file. However, I would like to use the set's numeric header instead. I have tried to replace (50 + (i*5)) by (columnheader(i + 1)), but Gnuplot complains about "undefined function: columnheader." The columnheader(i + 1) call works perfectly fine just a few characters away in the same plot line, when it is used for setting the title. How can I use the header of the data set as the X axis value? Best regards, Martin Pola |
|
From: sfeam <sf...@us...> - 2017-10-29 23:42:51
|
On Monday, 30 October 2017 00:18:31 theozh wrote:
> Thanks again for your patient explanations.
>
> My (mis)understanding probably is that I thought you can place
> either (i.e. XOR) a <definition> or a <function> or a <data source>
>
> plot-element:
> {<iteration>}
> <definition> | {sampling-range} <function> | <data source>
> {axes <axes>} {<title-spec>}
> {with <style>}
Your have a point.
The BNF syntax shown in the help text is not correct.
Probably it has been amended in parallel to changes in the plot code
and at some point the logic diverged.
I should probably go back to the source and work out a proper description
from the ground up.
Ethan
> however,
> plot n=n+1 sin(x*n)
> is a <definition> AND a <function>
> whereas <function> AND <data source> at the same time is not supposed to work.
|
|
From: theozh <th...@gm...> - 2017-10-29 23:18:39
|
Thanks again for your patient explanations.
My (mis)understanding probably is that I thought you can place
either (i.e. XOR) a <definition> or a <function> or a <data source>
plot-element:
{<iteration>}
<definition> | {sampling-range} <function> | <data source>
{axes <axes>} {<title-spec>}
{with <style>}
however,
plot n=n+1 sin(x*n)
is a <definition> AND a <function>
whereas <function> AND <data source> at the same time is not supposed to work.
|
|
From: sfeam <sf...@us...> - 2017-10-29 22:36:14
|
On Sunday, 29 October 2017 01:01:10 theozh wrote:
> Thank you again, Ethan, for the explanations and links.
>
> What's still not clear to me why you can place the
> ysum=0 between two plot commands...
That part is explained by "help plot".
Syntax:
plot {<ranges>} <plot-element> {, <plot-element>, <plot-element>}
Each plot element consists of a definition, a function, or a data source
together with optional properties or modifiers:
plot-element:
{<iteration>}
<definition> | {sampling-range} <function> | <data source>
{axes <axes>} {<title-spec>}
{with <style>}
the "ysum = 0" matches the <definition> template "foo = <expression>".
> What else can you place in front of a plot command?
> For example:
> n=1
> plot n=n+1 sin(x*n) # works
> plot (n=1,n=n+1) sin(x*n) # doesn't work... why?
because "(n=1,n=n+1)" is not a definition.
You could make it one by adding a dummy assignment:
plot dummy=(n=1,n=n+1) sin(x*n)
Ethan
>
> Anyway, my original question is solved :-).
> Nevertheless, I played around a little further.
> If the portions in the stacked histogram are too small to fit a number,
> the following code shows a way to place those numbers on the side with a
> pointing arrow.
> Maybe some people also mind find this useful.
>
> The following code was working on my system (Win7, gnuplot 5.2) and
> should be ready for copy&paste&plot. Be aware that the mail program
> might have "messed up" the line breaks.
>
> ###### start gnuplot code
> reset
> $Data <<EOD
> XXX Header1 Header2
> one 10 50
> two 3 2
> three 30 15
> four 40 5
> five 0.5 0.5
> six 0.6 0.6
> seven 1 17
> EOD
>
> set style data histogram
> set style histogram columnstacked
> set style fill solid border -1
> set boxwidth 0.6
>
> YminSpace = 4
> YStep = 2
> YExtraDistance = -YStep
> XShift(n) = (n < YminSpace) ? 0.45 : 0
> YShift(n) = (n < YminSpace) ?
> (YExtraDistance=YExtraDistance+YStep,YExtraDistance) :
> (YExtraDistance=-YStep,0)
>
> plot \
> $Data u 2 ti col , '' u 3:key(1) ti col, \
> ysum=0 '' skip 1 using (0+XShift($2)):((ysum = ysum + $2,
> ysum-$2/2+YShift($2))):2 with labels notitle, \
> ysum=0 '' skip 1 using (1+XShift($3)):((ysum = ysum + $3,
> ysum-$3/2+YShift($3))):3 with labels notitle,\
> ysum=0 '' skip 1 using ($2>YminSpace ? 1/0:(0+XShift($2)-0.05)):((ysum
> = ysum + $2, ysum-$2/2+YShift($2))):(-0.1):(-YExtraDistance) ls -1 with
> vectors not,\
> ysum=0 '' skip 1 using ($3>YminSpace ? 1/0:(1+XShift($3)-0.05)):((ysum
> = ysum + $3, ysum-$3/2+YShift($3))):(-0.1):(-YExtraDistance) ls -1 with
> vectors not,\
>
> ###### end gnuplot code
|
|
From: theozh <th...@gm...> - 2017-10-28 23:01:12
|
Thank you again, Ethan, for the explanations and links. What's still not clear to me why you can place the ysum=0 between two plot commands... What else can you place in front of a plot command? For example: n=1 plot n=n+1 sin(x*n) # works plot (n=1,n=n+1) sin(x*n) # doesn't work... why? Anyway, my original question is solved :-). Nevertheless, I played around a little further. If the portions in the stacked histogram are too small to fit a number, the following code shows a way to place those numbers on the side with a pointing arrow. Maybe some people also mind find this useful. The following code was working on my system (Win7, gnuplot 5.2) and should be ready for copy&paste&plot. Be aware that the mail program might have "messed up" the line breaks. ###### start gnuplot code reset $Data <<EOD XXX Header1 Header2 one 10 50 two 3 2 three 30 15 four 40 5 five 0.5 0.5 six 0.6 0.6 seven 1 17 EOD set style data histogram set style histogram columnstacked set style fill solid border -1 set boxwidth 0.6 YminSpace = 4 YStep = 2 YExtraDistance = -YStep XShift(n) = (n < YminSpace) ? 0.45 : 0 YShift(n) = (n < YminSpace) ? (YExtraDistance=YExtraDistance+YStep,YExtraDistance) : (YExtraDistance=-YStep,0) plot \ $Data u 2 ti col , '' u 3:key(1) ti col, \ ysum=0 '' skip 1 using (0+XShift($2)):((ysum = ysum + $2, ysum-$2/2+YShift($2))):2 with labels notitle, \ ysum=0 '' skip 1 using (1+XShift($3)):((ysum = ysum + $3, ysum-$3/2+YShift($3))):3 with labels notitle,\ ysum=0 '' skip 1 using ($2>YminSpace ? 1/0:(0+XShift($2)-0.05)):((ysum = ysum + $2, ysum-$2/2+YShift($2))):(-0.1):(-YExtraDistance) ls -1 with vectors not,\ ysum=0 '' skip 1 using ($3>YminSpace ? 1/0:(1+XShift($3)-0.05)):((ysum = ysum + $3, ysum-$3/2+YShift($3))):(-0.1):(-YExtraDistance) ls -1 with vectors not,\ ###### end gnuplot code |
|
From: sfeam <sf...@us...> - 2017-10-28 16:31:18
|
On Saturday, 28 October 2017 10:23:40 theozh wrote:
> Thanks a lot Ethan,
> I'll never would have found this one.
> With the minor change "ysum-$2/2", the following seems to place the
> number in the center of the portion.
>
> plot $Data u 2 ti col , '' u 3:key(1) ti col, \
> ysum=0 '' skip 1 using (0):((ysum = ysum + $2, ysum-$2/2)):2 with
> labels notitle, \
> ysum=0 '' skip 1 using (1):((ysum = ysum + $3, ysum-$3/2)):3 with
> labels notitle
>
> However, if looking at the syntax in "help plot"
> plot-element:
> {<iteration>}
> <definition> | {sampling-range} <function> | <data source>
> {axes <axes>} {<title-spec>}
> {with <style>}
>
> I still don't understand why and how ((ysum = ysum + $2, ysum-$2/2))
> works.
The comma is a mathematical binary operator indicating
serial evaluation. The operation
A,B
signifies "first evaluate A, then evaluate B, return the latter result"
https://en.wikipedia.org/wiki/Comma_operator
> So apparently, you can place an expression/function before the
> comma and the expression after the comma is actually plotted? Good to
> know, I didn't know that one can make such constructs. Would be nice to
> have an example in "plot help" or if you have a link where to find this
> documented, please let me know.
gnuplot> help expression operators binary
(4th from last in the long list of operators)
Serial evaluation occurs only in parentheses and is guaranteed to proceed
in left to right order. The value of the rightmost subexpression is returned.
For a demo the makes good use of this operator see
http://gnuplot.sourceforge.net/demo_cvs/running_avg.html
Ethan
|
|
From: theozh <th...@gm...> - 2017-10-28 08:24:05
|
Thanks a lot Ethan,
I'll never would have found this one.
With the minor change "ysum-$2/2", the following seems to place the
number in the center of the portion.
plot $Data u 2 ti col , '' u 3:key(1) ti col, \
ysum=0 '' skip 1 using (0):((ysum = ysum + $2, ysum-$2/2)):2 with
labels notitle, \
ysum=0 '' skip 1 using (1):((ysum = ysum + $3, ysum-$3/2)):3 with
labels notitle
However, if looking at the syntax in "help plot"
plot-element:
{<iteration>}
<definition> | {sampling-range} <function> | <data source>
{axes <axes>} {<title-spec>}
{with <style>}
I still don't understand why and how ((ysum = ysum + $2, ysum-$2/2))
works. So apparently, you can place an expression/function before the
comma and the expression after the comma is actually plotted? Good to
know, I didn't know that one can make such constructs. Would be nice to
have an example in "plot help" or if you have a link where to find this
documented, please let me know.
|
|
From: Ethan M. <eam...@gm...> - 2017-10-27 22:50:58
|
This could maybe serve as a starting point. The placement is not pretty
but it shows the basic principle.
plot $Data u 2 ti col , '' u 3:key(1) ti col, \
ysum=0 '' skip 1 using (0):((ysum = ysum + $2, ysum-5)):2 with labels
notitle, \
ysum=0 '' skip 1 using (1):((ysum = ysum + $3, ysum-5)):3 with labels
notitle
On Fri, Oct 27, 2017 at 2:24 PM, theozh <th...@gm...> wrote:
> Hi,
> Is there maybe a simple way to place the values on top of
> in a column stacked histogram?
> The following example does not place the labels at the right
> y-positions, i.e. ideally centered within the different portions.
> For this you would need to somehow sum up the previous values. I do not
> see how...
> Any hints are appreciated!
> Theo.
>
> ###### gnuplot code start
> reset
> $Data <<EOD
> XXX Header1 Header2
> one 10 50
> two 20 30
> three 30 15
> four 40 5
> EOD
>
> set style data histogram
> set style histogram columnstacked
> set style fill solid border -1
> set boxwidth 0.75
>
> plot $Data u 2 ti col , '' u 3:key(1) ti col, \
> '' u (0):2:2 with labels notitle, '' u (1):3:2 with labels notitle
>
> ###### gnuplot code end
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/
> lists/listinfo/gnuplot-info
>
|
|
From: theozh <th...@gm...> - 2017-10-27 21:25:13
|
Hi,
Is there maybe a simple way to place the values on top of
in a column stacked histogram?
The following example does not place the labels at the right
y-positions, i.e. ideally centered within the different portions.
For this you would need to somehow sum up the previous values. I do not
see how...
Any hints are appreciated!
Theo.
###### gnuplot code start
reset
$Data <<EOD
XXX Header1 Header2
one 10 50
two 20 30
three 30 15
four 40 5
EOD
set style data histogram
set style histogram columnstacked
set style fill solid border -1
set boxwidth 0.75
plot $Data u 2 ti col , '' u 3:key(1) ti col, \
'' u (0):2:2 with labels notitle, '' u (1):3:2 with labels notitle
###### gnuplot code end
|
|
From: David K. <da...@gn...> - 2017-10-22 14:01:28
|
Because of the current epslatex terminal's inability to draw dashed line
patterns in contours, I am in trouble.
Issue 1612 would indicate that temporarily saving contours to data may
help, but that apparently is only feasible when using the data with plot
(and thus a rectangular projection) rather than splot: for the following
fragment
set table $blobs
splot [-pi:pi][-3:3] 2*pi*Vm0m1(1,-1,0,pi/4,x,y) title "$2\\pi V_{1,-1}^{(0,\\pi/4)}(\\theta,p)$" nosurface
unset table
splot [-pi:pi][-3:3] 2*pi*Vm0m1(1,-1,0,pi/4,x,y) title "$2\\pi V_{1,-1}^{(0,\\pi/4)}(\\theta,p)$" nocontours, $blobs nosurface
I get
splot [-pi:pi][-3:3] 2*pi*Vm0m1(1,-1,0,pi/4,x,y) title "$2\\pi V_{1,-1}^{(0,\\pi/4)}(\\theta,p)$" nocontours, $blobs nosurface
^
"wigner4.gp", line 190: 2 columns only possible with explicit pm3d style (line 8)
Is there any expedient for reattaching exported contours into a full
splot command, allowing me to root around the current dash pattern
initialization bug?
--
David Kastrup
|
|
From: David K. <da...@gn...> - 2017-10-19 09:07:19
|
David Kastrup <da...@gn...> writes: > Ethan Merritt <eam...@gm...> writes: > My expectation is colored by current documentation that is supposed to > reflect the change from 4.x to 5.x. It is not like I didn't quote it. > As it is, Gnuplot is useless for creating monochrome surface plots with > contours because all contour lines will look the same. This wasn't the > case in Gnuplot 4.x, and the documented replacement for versions >= 5.0 > does not work. And this was already noted in <https://sourceforge.net/p/gnuplot/bugs/1612/#d961> in 2015 after which the containing issue was closed without further comment. There may be a backstory I am not aware of, but the resulting discrepancy between documentation and code is not telling it. -- David Kastrup |
|
From: David K. <da...@gn...> - 2017-10-18 07:26:47
|
Ethan A Merritt <eam...@gm...> writes: > On Tuesday, 17 October 2017 15:13:49 Ethan Merritt wrote: >> You are now, as I understand it, advocating that both the linewidth and dashtype >> properties should act as the linecolor does. I'm fine with adding that as >> a user-specified option, but it would be something new rather than a return to >> what any previous gnuplot version did. > > > It occurs to me that if we do add something of this sort, > it might be more usable to assign the linewidth or dashpattern > directly to a series of contour levels rather than indirectly by > counting out linetypes and tryiing to figure out which level is > going to get which linetype. > > Something like we already do with axis tic labels > > set cntrlabel onecolor > set cntrparam level discrete 0 dashtype '..' > set cntrparam level add incremental 10, 10 linewidth 2 > set cntrparam level add incremental 2, 10 linewidth 0.5 > set cntrparam level add incremental 4, 10 linewidth 0.5 > set cntrparam level add incremental 6, 10 linewidth 0.5 > set cntrparam level add incremental 8, 10 linewidth 0.5 > > That would get you a dotted contour at 0, heavy lines every 10, > and thin lines every 2 otherwise. All the same color in this case. > > Thoughts? Mostly useless for linetypes displayed in a key. Both plot types and contour line labels are usually listed in a key, so it does not make a lot of sense to treat them differently in that respect. -- David Kastrup |
|
From: David K. <da...@gn...> - 2017-10-18 07:24:17
|
Ethan Merritt <eam...@gm...> writes:
> On Tue, Oct 17, 2017 at 6:38 AM, David Kastrup <da...@gn...> wrote:
>
>> Ethan A Merritt <eam...@gm...> writes:
>>
>> > On Sunday, 15 October 2017 10:53:08 Ethan A Merritt wrote:
>> >> On Sunday, 15 October 2017 13:06:50 David Kastrup wrote:
>> >> >
>> >> > So I now tried compiling 5.2.0.
>> >> >
>> >> > No change in the epslatex terminal: it would appear that _only_ the
>> >> > linewidth and the dash pattern for linestyle 1 are ever consulted and
>> >> > are used for _all_ lines. Linecolor can be changed per line style,
>> but
>> >> > pretty much nothing else.
>> >>
>> >> Correct. It steps through sequential line colors.
>> >>
>> >> > Anybody have a good idea for where to patch this up?
>> >>
>> >> The following 1-line change might or might not produce acceptable
>> >> results for you. One problem is that the line segments making up
>> >> a contour are not necessarily drawn in order and some terminals
>> >> reset the dash pattern for each segment, leading to mostly solid
>> >> or mostly missing lines rather than the desired dash pattern.
>> >> For other terminal types this doesn't seem to be a problem.
>> >>
>> >> If this does work for you please report back.
>> >> We could make it an optional setting of some sort.
>>
>> I don't think following the documentation is "optional".
>>
>> [snip]
>
> I think I understand what you are expecting from the program, but honestly
> it has never worked that way.
Shrug. Of course not: dash types as part of line style were a 5.0
thing. Before one used
set terminal epslatex dashed
but dashed is now ignored, and the _documented_ replacement one is
supposed to be using does not work. And now you state it shouldn't
work, documentation be damned. But in a monochrome print, having all
contour lines look the same is not an option.
> You are now, as I understand it, advocating that both the linewidth
> and dashtype properties should act as the linecolor does. I'm fine
> with adding that as a user-specified option, but it would be something
> new rather than a return to what any previous gnuplot version did.
Look, this isn't fun.
help dash
clearly states:
gnuplot> help dash
In gnuplot version 5 the dash pattern (`dashtype`) is a separate property
associated with each line, analogous to `linecolor` or `linewidth`. It is not
necessary to place the current terminal in a special mode just to draw dashed
lines. I.e. the command `set term <termname> {solid|dashed}` is now ignored.
If backwards compatibility with old scripts written for version 4 is required,
the following lines can be used instead:
if (GPVAL_VERSION >= 5.0) set for [i=1:9] linetype i dashtype i
if (GPVAL_VERSION < 5.0) set termoption dashed
So _of_ _course_ this worked differently before version 5.0. The
problem is that it _worked_. Now it doesn't work at all. There is
absolutely no more way to get differently dashed contours in a
monochrome terminal since the documented replacement does not work, and
you state that you think it should be an optional feature to have it
work.
> Note: Your expectation may be colored by past behaviour of the
> postscript terminal driver.
My expectation is colored by current documentation that is supposed to
reflect the change from 4.x to 5.x. It is not like I didn't quote it.
As it is, Gnuplot is useless for creating monochrome surface plots with
contours because all contour lines will look the same. This wasn't the
case in Gnuplot 4.x, and the documented replacement for versions >= 5.0
does not work.
--
David Kastrup
|
|
From: Ethan A M. <eam...@gm...> - 2017-10-18 04:22:35
|
On Tuesday, 17 October 2017 15:13:49 Ethan Merritt wrote: > You are now, as I understand it, advocating that both the linewidth and dashtype > properties should act as the linecolor does. I'm fine with adding that as > a user-specified option, but it would be something new rather than a return to > what any previous gnuplot version did. It occurs to me that if we do add something of this sort, it might be more usable to assign the linewidth or dashpattern directly to a series of contour levels rather than indirectly by counting out linetypes and tryiing to figure out which level is going to get which linetype. Something like we already do with axis tic labels set cntrlabel onecolor set cntrparam level discrete 0 dashtype '..' set cntrparam level add incremental 10, 10 linewidth 2 set cntrparam level add incremental 2, 10 linewidth 0.5 set cntrparam level add incremental 4, 10 linewidth 0.5 set cntrparam level add incremental 6, 10 linewidth 0.5 set cntrparam level add incremental 8, 10 linewidth 0.5 That would get you a dotted contour at 0, heavy lines every 10, and thin lines every 2 otherwise. All the same color in this case. Thoughts? Ethan |
|
From: Ethan M. <eam...@gm...> - 2017-10-17 22:13:56
|
On Tue, Oct 17, 2017 at 6:38 AM, David Kastrup <da...@gn...> wrote: > Ethan A Merritt <eam...@gm...> writes: > > > On Sunday, 15 October 2017 10:53:08 Ethan A Merritt wrote: > >> On Sunday, 15 October 2017 13:06:50 David Kastrup wrote: > >> > > >> > So I now tried compiling 5.2.0. > >> > > >> > No change in the epslatex terminal: it would appear that _only_ the > >> > linewidth and the dash pattern for linestyle 1 are ever consulted and > >> > are used for _all_ lines. Linecolor can be changed per line style, > but > >> > pretty much nothing else. > >> > >> Correct. It steps through sequential line colors. > >> > >> > Anybody have a good idea for where to patch this up? > >> > >> The following 1-line change might or might not produce acceptable > >> results for you. One problem is that the line segments making up > >> a contour are not necessarily drawn in order and some terminals > >> reset the dash pattern for each segment, leading to mostly solid > >> or mostly missing lines rather than the desired dash pattern. > >> For other terminal types this doesn't seem to be a problem. > >> > >> If this does work for you please report back. > >> We could make it an optional setting of some sort. > > I don't think following the documentation is "optional". > > [snip] I think I understand what you are expecting from the program, but honestly it has never worked that way. Prior to gnuplot version 5 linetypes did not include a "dashtype" property, so the question of applying or not applying it to draw contours was moot. Linetypes did have a "linewidth" property of course, but just as now only one linewidth was used for all the contours in a plot. I've gone back and confirmed that for versions 4.4 and 4.6. When gnuplot version 5 introduced dashtypes, we had to choose whether for the purposes of drawing contours they would follow the example of the linecolor property (increment for each contour level) or linewidth property (same for the entire plot). There was no strong advocacy either way and we ended up choosing to treat it as analogous to linewidth. You are now, as I understand it, advocating that both the linewidth and dashtype properties should act as the linecolor does. I'm fine with adding that as a user-specified option, but it would be something new rather than a return to what any previous gnuplot version did. Note: Your expectation may be colored by past behaviour of the postscript terminal driver. Prior to gnuplot version 5 the postscript terminal acted differently from all other terminal types. One of the goals set for version 5 was to get all terminals to behave as consistently as possible, even at the cost of losing exact backwards compatibility. Normally backwards compatibility has the highest priority, so the 4->5 transition was highly unusual in that regard. |
|
From: David K. <da...@gn...> - 2017-10-17 13:39:17
|
Ethan A Merritt <eam...@gm...> writes:
> On Sunday, 15 October 2017 10:53:08 Ethan A Merritt wrote:
>> On Sunday, 15 October 2017 13:06:50 David Kastrup wrote:
>> >
>> > So I now tried compiling 5.2.0.
>> >
>> > No change in the epslatex terminal: it would appear that _only_ the
>> > linewidth and the dash pattern for linestyle 1 are ever consulted and
>> > are used for _all_ lines. Linecolor can be changed per line style, but
>> > pretty much nothing else.
>>
>> Correct. It steps through sequential line colors.
>>
>> > Anybody have a good idea for where to patch this up?
>>
>> The following 1-line change might or might not produce acceptable
>> results for you. One problem is that the line segments making up
>> a contour are not necessarily drawn in order and some terminals
>> reset the dash pattern for each segment, leading to mostly solid
>> or mostly missing lines rather than the desired dash pattern.
>> For other terminal types this doesn't seem to be a problem.
>>
>> If this does work for you please report back.
>> We could make it an optional setting of some sort.
I don't think following the documentation is "optional".
>From help set cntrlabel:
A contour label is placed in the plot key for each linetype used. By default
each contour level is given its own linetype, so a separate label appears for
each. The command `set cntrlabel onecolor` causes all contours to be drawn
using the same linetype, so only one label appears in the plot key.
This command replaces an older command `unset clabel`.
>From help set linetype:
The `set linetype` command allows you to redefine the basic linetypes used
for plots. The command options are identical to those for "set style line".
Unlike line styles, redefinitions by `set linetype` are persistent; they
are not affected by `reset`.
>From help set style line:
Each terminal has a default set of line and point types, which can be seen
by using the command `test`. `set style line` defines a set of line types
and widths and point types and sizes so that you can refer to them later by
an index instead of repeating all the information at each invocation.
Syntax:
set style line <index> default
set style line <index> {{linetype | lt} <line_type> | <colorspec>}
{{linecolor | lc} <colorspec>}
{{linewidth | lw} <line_width>}
{{pointtype | pt} <point_type>}
{{pointsize | ps} <point_size>}
{{pointinterval | pi} <interval>}
{{pointnumber | pn} <max_symbols>}
{{dashtype | dt} <dashtype>}
{palette}
unset style line
show style line
`default` sets all line style parameters to those of the linetype with
that same index.
>From help dashtype:
In gnuplot version 5 the dash pattern (`dashtype`) is a separate property
associated with each line, analogous to `linecolor` or `linewidth`. It is not
necessary to place the current terminal in a special mode just to draw dashed
lines. I.e. the command `set term <termname> {solid|dashed}` is now ignored.
If backwards compatibility with old scripts written for version 4 is required,
the following lines can be used instead:
if (GPVAL_VERSION >= 5.0) set for [i=1:9] linetype i dashtype i
if (GPVAL_VERSION < 5.0) set termoption dashed
All lines have the property `dashtype solid` unless you specify otherwise.
You can change the default for a particular linetype using the command
`set linetype` so that it affects all subsequent commands, or you can include
the desired dashtype as part of the `plot` or other command.
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> --- gnuplot52/src/graph3d.c 2017-09-15 20:26:48.393406844 -0700
>> +++ test52/src/graph3d.c 2017-10-15 10:50:39.698779538 -0700
>> @@ -1265,6 +1265,8 @@ do_3dplot(
>> /* otherwise the following would be sufficient */
>> load_linetype(&ls, this_plot->hidden3d_top_linetype + ic);
>> }
>> +/* DEBUG */ /* increment dashtype also */
>> +/* DEBUG */ thiscontour_lp_properties.d_type = ic;
>
> probably better as
>
> +/* DEBUG */ thiscontour_lp_properties.d_type = ls.d_type;
I can now set individual dash types. The individual linewidths still do
not seem to get consulted for the contour lines: it seems like the
linewidth of line style 1 is applied everywhere.
--
David Kastrup
|
|
From: Ethan A M. <eam...@gm...> - 2017-10-16 05:00:50
|
On Sunday, 15 October 2017 10:53:08 Ethan A Merritt wrote: > On Sunday, 15 October 2017 13:06:50 David Kastrup wrote: > > > > So I now tried compiling 5.2.0. > > > > No change in the epslatex terminal: it would appear that _only_ the > > linewidth and the dash pattern for linestyle 1 are ever consulted and > > are used for _all_ lines. Linecolor can be changed per line style, but > > pretty much nothing else. > > Correct. It steps through sequential line colors. > > > Anybody have a good idea for where to patch this up? > > The following 1-line change might or might not produce acceptable > results for you. One problem is that the line segments making up > a contour are not necessarily drawn in order and some terminals > reset the dash pattern for each segment, leading to mostly solid > or mostly missing lines rather than the desired dash pattern. > For other terminal types this doesn't seem to be a problem. > > If this does work for you please report back. > We could make it an optional setting of some sort. > > %%%%%%%%%%%%%%%%%%%%%%%%%%%% > --- gnuplot52/src/graph3d.c 2017-09-15 20:26:48.393406844 -0700 > +++ test52/src/graph3d.c 2017-10-15 10:50:39.698779538 -0700 > @@ -1265,6 +1265,8 @@ do_3dplot( > /* otherwise the following would be sufficient */ > load_linetype(&ls, this_plot->hidden3d_top_linetype + ic); > } > +/* DEBUG */ /* increment dashtype also */ > +/* DEBUG */ thiscontour_lp_properties.d_type = ic; probably better as +/* DEBUG */ thiscontour_lp_properties.d_type = ls.d_type; > thiscontour_lp_properties.pm3d_color = ls.pm3d_color; > term_apply_lp_properties(&thiscontour_lp_properties); > } > %%%%%%%%%%%%%%%%%%%%%%%%%%%% > > -- |
|
From: Ethan A M. <eam...@gm...> - 2017-10-15 17:53:17
|
On Sunday, 15 October 2017 13:06:50 David Kastrup wrote:
>
> So I now tried compiling 5.2.0.
>
> No change in the epslatex terminal: it would appear that _only_ the
> linewidth and the dash pattern for linestyle 1 are ever consulted and
> are used for _all_ lines. Linecolor can be changed per line style, but
> pretty much nothing else.
Correct. It steps through sequential line colors.
> Anybody have a good idea for where to patch this up?
The following 1-line change might or might not produce acceptable
results for you. One problem is that the line segments making up
a contour are not necessarily drawn in order and some terminals
reset the dash pattern for each segment, leading to mostly solid
or mostly missing lines rather than the desired dash pattern.
For other terminal types this doesn't seem to be a problem.
If this does work for you please report back.
We could make it an optional setting of some sort.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- gnuplot52/src/graph3d.c 2017-09-15 20:26:48.393406844 -0700
+++ test52/src/graph3d.c 2017-10-15 10:50:39.698779538 -0700
@@ -1265,6 +1265,8 @@ do_3dplot(
/* otherwise the following would be sufficient */
load_linetype(&ls, this_plot->hidden3d_top_linetype + ic);
}
+/* DEBUG */ /* increment dashtype also */
+/* DEBUG */ thiscontour_lp_properties.d_type = ic;
thiscontour_lp_properties.pm3d_color = ls.pm3d_color;
term_apply_lp_properties(&thiscontour_lp_properties);
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|