我有这个数据集:
"name01","9.3","1"
"name02","8.68","2"
"name03","8.57142857143","3"
"name04","8.45454545455","4"
"name05","8.34518174511","5"
"name06","8.22222222222","6"
"name07","8.16666666667","7"
"name08","8.14053254438","8"
"name09","8.11111111111","9"
"name10","7.93939393939","10"
"name11","7.92307692308","11"
"name12","7.89285714286","12"
"name13","7.81818181818","13"
"name14","7.8125","14"
"name15","7.77777777778","15"
"name16","7.70588235294","16"
"name17","7.66101694915","17"
"name18","7.65714285714","18"
"name19","7.45054945055","19"
"name20","7.425","20"
"name21","7.30769230769","21"
"name22","7.20689655172","22"
我想在图例上绘制所有“nameXX”的直方图。使用以下代码我有两个问题:
Gnuplot代码:
set terminal pngcairo enhanced size 1600,600
set output 'myhistogram.png'
set title "My Histogram" font "Arial, 14"
set auto x
set yrange [0:*]
set style data histogram
set key invert reverse Left outside
set key autotitle columnheader
set ytics 1
unset xtics
set style fill solid border -1
set palette color model HSV
set palette defined (0 0 1 1,1 1 1 1)
set palette defined ( 0 0 1 0, 1 0 1 1, 6 0.8333 1 1, 7 0.8333 0 1)
unset colorbox
set boxwidth 0.8
set datafile separator ","
stats "password_length_area.csv" using 2 nooutput
set yrange [0:STATS_max * 1.2]
plot "password_length_area.csv" using 0:2:3:key(1) with boxes lc palette
答案 0 :(得分:2)
一种可能性是通过# Source definition
u.sources.s1.type=jms
u.sources.s1.initialContextFactory=ABC
u.sources.s1.connectionFactory=<my connection factory>
u.sources.s1.providerURL=ABC
u.sources.s1.destinationName=r1
u.sources.s1.destinationType=QUEUE
# Channel definition
u.channels.c1.type=file
u.channels.c1.capacity=10000000
u.channels.c1.checkpointDir=/checkpointdir
u.channels.c1.transactionCapacity=10000
u.channels.c1.dataDirs=/datadir
# Sink definition
u.sinks.r1.type=hdfs
u.sinks.r1.channel=c1
u.sinks.r1.hdfs.path=/message/%Y%m%d
u.sinks.r1.hdfs.filePrefix=event_
u.sinks.r1.hdfs.fileSuffix=.xml
u.sinks.r1.hdfs.fileType = DataStream
u.sinks.r1.hdfs.writeFormat=Text
u.sinks.r1.hdfs.useLocalTimeStamp=TRUE
语句单独绘制单个框。至于密钥,下面的示例在每次迭代中将第一列的字符串值保存到变量for
中,然后将其用于相应的msg
:
title