A real example of vioplot in R (sample data and code attached)
Basic information
- Package name: vioplot
- Package homepage: https://cran.r-project.org/web/packages/vioplot/index.html
- Usage: https://cran.r-project.org/web/packages/vioplot/vioplot.pdf
R code
install.packages('sm') # dependency
install.packages('vioplot')
library(vioplot)
coverage = read.csv("/Users/xubowen/Downloads/coverage.csv")
Statements <- coverage$Statements
Branches <- coverage$Branches
Functions <- coverage$Functions
Lines <- coverage$Lines
vioplot(Statements,Branches,Functions,Lines,names=c("Statements","Branches","Functions","Lines"), col=c("gold"))
Result
Sample data
Project | Statements | Branches | Functions | Lines |
---|---|---|---|---|
workpresstech#smartcontract-ico/cases/39 | 1.23 | 1 | 3.45 | 1.5 |
workpresstech#smartcontract-ico/cases/35 | 1.23 | 0.94 | 3.49 | 1.49 |
vitaliy-kuzmich#bets/cases/1 | 0.96 | 0 | 6.25 | 0.81 |
telcoin#ico/cases/2 | 90 | 73.61 | 91.3 | 89.69 |
telcoin#ico/cases/1 | 82.08 | 82.29 | 87.5 | 81.36 |
status-im#status-network-token/cases/7 | 41.39 | 32.01 | 54.7 | 45.01 |
status-im#status-network-token/cases/4 | 43.67 | 31.43 | 55 | 44.35 |
ruthlessammo#chainlist/cases/1 | 100 | 100 | 100 | 100 |
palanisn#civic-ledger-test/cases/1 | 97.73 | 55 | 90.91 | 98.04 |
modum-io#tokenapp-smartcontract/cases/1 | 84.51 | 68.89 | 86.21 | 84.62 |
mavinnetwork#smart-contract/cases/38 | 1.23 | 1 | 3.45 | 1.5 |
mavinnetwork#smart-contract/cases/34 | 1.23 | 0.94 | 3.49 | 1.49 |
madhancr#splitter_contract/cases/1 | 76.47 | 33.33 | 75 | 93.33 |
kikohash#solidity/cases/39 | 1.23 | 1 | 3.45 | 1.5 |
kikohash#solidity/cases/35 | 1.23 | 0.94 | 3.49 | 1.49 |
jinliman#solidity/cases/48 | 1.23 | 1 | 3.45 | 1.5 |
jinliman#solidity/cases/44 | 1.23 | 0.94 | 3.49 | 1.49 |
iamtrask#Sonar/cases/3 | 89.29 | 68.75 | 90 | 90.91 |
gointollc#etherep-contracts/cases/3 | 80.26 | 67.86 | 84 | 81.61 |
gointollc#etherep-contracts/cases/1 | 73.91 | 70 | 93.1 | 71.95 |
gnosis#owl-token/cases/1 | 8.63 | 7.14 | 23.08 | 8.45 |
galactictourist#SolidityFooCoin/cases/22 | 1.23 | 1 | 3.45 | 1.5 |
galactictourist#SolidityFooCoin/cases/18 | 1.23 | 0.94 | 3.49 | 1.49 |
ethereum-alarm-clock#ethereum-alarm-clock/cases/7 | 26.16 | 25.32 | 21.6 | 28.27 |
epicluckycoin#smartcontract/cases/1 | 87.1 | 55.88 | 93.75 | 87.69 |
eloplay#eloplay-token/cases/2 | 71.91 | 59.26 | 63.64 | 70.93 |
deconet#DeconetSmartContracts/cases/5 | 80 | 41.67 | 78.95 | 80.77 |
cryptoironbank#contracts/cases/48 | 1.23 | 1 | 3.45 | 1.5 |
cryptoironbank#contracts/cases/44 | 1.23 | 0.94 | 3.49 | 1.49 |
consensus-ai#sen-contracts/cases/1 | 83.8 | 65.48 | 89.36 | 83.77 |
connectjob#CJToken/cases/8 | 70.11 | 58.7 | 68 | 70.79 |
clearmatics#asset-token/cases/4 | 35.29 | 16.67 | 46.15 | 35.9 |
clearmatics#asset-token/cases/3 | 41.18 | 32.35 | 53.33 | 43.68 |
chris-bluemoon#OpenZeppelin/cases/44 | 1.23 | 0.94 | 3.49 | 1.49 |
canepat#b9lab-rockpaperscissors/cases/1 | 7.35 | 4.76 | 6.67 | 8.2 |
bvand#ethereum-wtp/cases/4 | 40.43 | 25 | 58.33 | 45.61 |
bvand#ethereum-wtp/cases/3 | 79.63 | 59.38 | 92.86 | 81.54 |
bodhiproject#bodhi-core/cases/1 | 87.92 | 72.3 | 90 | 88.51 |
bitpopulous#populous-smartcontracts/cases/5 | 32.99 | 12 | 34.88 | 31.43 |
bitpopulous#populous-smartcontracts/cases/4 | 58.42 | 26.92 | 65.91 | 58.72 |
bitpopulous#populous-smartcontracts/cases/3 | 63.46 | 30.77 | 72.73 | 66.07 |
bitpopulous#populous-smartcontracts/cases/1 | 72.44 | 35.48 | 77.78 | 73.88 |
assafmo#PotOfEther/cases/1 | 98.33 | 95.83 | 87.5 | 98.44 |
Vutov#DApps-BettingContract/cases/2 | 95.16 | 71.88 | 88.24 | 94.59 |
Vutov#DApps-BettingContract/cases/1 | 95.08 | 73.33 | 88.24 | 94.52 |
V0idWayfarer#zep/cases/42 | 1.23 | 1 | 3.45 | 1.5 |
V0idWayfarer#zep/cases/38 | 1.23 | 0.94 | 3.49 | 1.49 |
USDXToken#USDX-token/cases/2 | 81.58 | 53.13 | 83.78 | 80.16 |
Telegram-ICO#GRAM/cases/49 | 1.23 | 1 | 3.45 | 1.5 |
Telegram-ICO#GRAM/cases/45 | 1.23 | 0.94 | 3.49 | 1.49 |
SpringRole#smart-contracts/cases/2 | 64.57 | 39.71 | 61.7 | 62.14 |
SpringRole#smart-contracts/cases/1 | 64.57 | 39.71 | 61.7 | 62.14 |
SelfKeyFoundation#staked-access/cases/1 | 92.86 | 68.18 | 88.24 | 89.74 |
Riksi#Sonar/cases/3 | 89.29 | 68.75 | 90 | 90.91 |
PolymathNetwork#polymath-core-deprecated/cases/35 | 17.62 | 9.26 | 22.73 | 17.09 |
PolymathNetwork#polymath-core-deprecated/cases/34 | 17.62 | 9.26 | 22.73 | 17.09 |
PolymathNetwork#polymath-core-deprecated/cases/30 | 17.62 | 9.26 | 22.73 | 17.09 |
PolymathNetwork#polymath-core-deprecated/cases/14 | 15.1 | 7.84 | 20.59 | 14.79 |
OpenZeppelin#openzeppelin-solidity/cases/49 | 1.23 | 1 | 3.45 | 1.5 |
OpenZeppelin#openzeppelin-solidity/cases/45 | 1.23 | 0.94 | 3.49 | 1.49 |
OpenSTFoundation#openst-protocol/cases/2 | 55.2 | 42.5 | 58.78 | 54.37 |
NetTrafficGroup#OpenZeppelin-Muzz/cases/49 | 1.23 | 1 | 3.45 | 1.5 |
NetTrafficGroup#OpenZeppelin-Muzz/cases/45 | 1.23 | 0.94 | 3.49 | 1.49 |
Narongsaewa#openzeppelin/cases/22 | 1.23 | 1 | 3.45 | 1.5 |
Narongsaewa#openzeppelin/cases/18 | 1.23 | 0.94 | 3.49 | 1.49 |
MainframeHQ#contracts/cases/5 | 46.09 | 31.03 | 52 | 45.93 |
MADANA-IO#zeppelin-pull-requests/cases/39 | 1.23 | 1 | 3.45 | 1.5 |
MADANA-IO#zeppelin-pull-requests/cases/35 | 1.23 | 0.94 | 3.49 | 1.49 |
Distense#distense-contracts/cases/1 | 76.11 | 47.44 | 82.46 | 75.59 |
DataBrokerDAO#dtx-crowdsale-contracts/cases/1 | 92.68 | 61.43 | 94.12 | 92.94 |
ConsenSys#PLCRVoting/cases/8 | 80.74 | 69.35 | 82.05 | 82.44 |
ConsenSys#PLCRVoting/cases/12 | 60.92 | 26.32 | 56.67 | 60.92 |
CastlePeakGame#Contracts/cases/48 | 1.23 | 1 | 3.45 | 1.5 |
CastlePeakGame#Contracts/cases/44 | 1.23 | 0.94 | 3.49 | 1.49 |
BlockchainLabsNZ#gambit/cases/1 | 97.3 | 70.83 | 92.31 | 97.37 |
BitGuildPlatform#Crowdsale/cases/1 | 56.84 | 37.5 | 61.9 | 59.57 |
Bit-Nation#nation-framework/cases/2 | 100 | 70.59 | 100 | 98.78 |
Bassel85#zeppelin-solidity/cases/22 | 1.23 | 1 | 3.45 | 1.5 |
Bassel85#zeppelin-solidity/cases/18 | 1.23 | 0.94 | 3.49 | 1.49 |
Antibody#Solidity/cases/49 | 1.23 | 1 | 3.45 | 1.5 |
Antibody#Solidity/cases/45 | 1.23 | 0.94 | 3.49 | 1.49 |
AdChain#AdChainRegistry/cases/13 | 77.2 | 41.67 | 86.05 | 75.86 |
AdChain#AdChainRegistry/cases/11 | 76.26 | 39.19 | 78.72 | 75.24 |
64-Corp#zeppelin-solidity/cases/17 | 1.23 | 1 | 3.45 | 1.5 |
64-Corp#zeppelin-solidity/cases/13 | 1.23 | 0.94 | 3.49 | 1.49 |
0xcaff#splitter-contract/cases/1 | 57.14 | 16.67 | 100 | 56.25 |
If you have any questions about this article, welcome to leave a message on the message board.
Brad(Bowen) Xu
E-Mail : maxxbw1992@gmail.com