set fileContentList {
{}
{
% This file is interpreted by tcl so each LaTeX back slash must be duplicated
\\documentclass[brazilian,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao]{http://urlib.net/iconet.com.br/banon/2008/03.25.01.19/tdiinpe}
%\\documentclass[brazilian,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacaoo]{tdiinpe}
%\\documentclass[brazilian,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao]{../../../../../iconet.com.br/banon/2008/03.25.01.19/doc/tdiinpe}

\\repositorio{$thisRepository} %% repositório onde está depositado o documento

\\RequirePackage{comment}

\\begin{comment}

[[

set siteList {
marte.dpi.inpe.br:80
mtc-m05.sid.inpe.br:80
mtc-m16.sid.inpe.br:80
{mtc-m15.sid.inpe.br 800}
{ismm.dpi.inpe.br 800}
{mtc-m18.sid.inpe.br 800}
{mtc-m19.sid.inpe.br 800}
{md-m09.sid.inpe.br 800}
mtc-m12.sid.inpe.br:80
mtc-m17.sid.inpe.br:80
{plutao.dpi.inpe.br 800}
bibdigital.sid.inpe.br:80
}

proc CreateDataSet {args} {
set i 0
set data {}
foreach input [[lindex $args 0]] {
set line {}
foreach list $args {
lappend line [[lindex $list $i]]
}
lappend data $line
incr i
}
return [[join $data \n]]
}

# CreateSequence creates a list of bar group position along the x axis
proc CreateSequence {numberOfItems firstSequenceItem increment} {
set sequenceItem $firstSequenceItem
for {set i 1} {$i <= $numberOfItems} {incr i} {
lappend sequence $sequenceItem
set sequenceItem [[expr $sequenceItem + $increment]]
}
return $sequence
}

proc ComputeAxisParameters {dxticks barWidth xnameList numberOfItemsList} {
set firstSequenceItem [[expr 2 * $barWidth]]
set xmax [[expr ([[llength $xnameList]] - 1) * $dxticks + 4 * $barWidth]]
# set maxValue [[expr round(1.1 * [[lindex [[lsort -integer $numberOfItemsList]] end]])]]	;# 58
set maxValue [[expr round(1.04 * [[lindex [[lsort -integer $numberOfItemsList]] end]])]]	;# 1.04 * 10
set factor [[expr pow(10, [[string length $maxValue]] - 1)]]	;# 10.0
set numberOfUnits [[expr int(ceil($maxValue / $factor))]]	;# 6
# set maxTable(1) 1; set dticksTable(1) 0.2
set maxTable(1) 1.2; set dticksTable(1) 0.2	;# maxValue == 1
set maxTable(2) 2.5; set dticksTable(2) 0.5
set maxTable(3) 3; set dticksTable(3) 0.5
set maxTable(4) 4; set dticksTable(4) 1
set maxTable(5) 5; set dticksTable(5) 1
set maxTable(6) 6; set dticksTable(6) 1
set maxTable(7) 8; set dticksTable(7) 2
set maxTable(8) 8; set dticksTable(8) 2
set maxTable(9) 10; set dticksTable(9) 2
set maxTable(10) 12; set dticksTable(10) 2
# set ymax [[expr int($maxTable($numberOfUnits) * $factor)]]	;# 60
# set dyticks [[expr int($dticksTable($numberOfUnits) * $factor)]]	;# 10
set ymax [[expr $maxTable($numberOfUnits) * $factor]]	;# 60
set dyticks [[expr $dticksTable($numberOfUnits) * $factor]]	;# 10
return [[list $firstSequenceItem $xmax $ymax $dyticks]]
}

set currentYear 2009
set ingestYearList {2001 2002 2003 2004 2005 2006 2007 2008 2009}
set publicationYearList {2001 2002 2003 2004 2005 2006 2007 2008 2009}
set vivaPublicationYearList {2001 2002 2003 2004 2005 2006 2007 2008 2009}

set referenceTypeTable(AR) {Artigo em revista}
set referenceTypeTable(AE) {Artigo em evento}
set referenceTypeTable(CL) {Cap\'itulo de Livro}
set referenceTypeTable(eP) {ePrint}
set referenceTypeTable(L) {Livro}
set referenceTypeTable(MA) {Material Audiovisual}
set referenceTypeTable(MNP) {MAN NTC PUD}
set referenceTypeTable(R) {Relat\'orio}
set referenceTypeTable(RJ) {Recorte de jornal}
set referenceTypeTable(TD) {Tese e disserta\c{c}\~ao}

set referenceTypeList {AR L MNP CL AE TD R eP MA RJ}	;# specifies the display order

set referenceTypeTable2(AR) {referencetype, Journal Article}
set referenceTypeTable2(AE) {referencetype, Conference Proceedings}
set referenceTypeTable2(CL) {referencetype, Book Section}
set referenceTypeTable2(eP) {referencetype, Electronic Source}
set referenceTypeTable2(L) {secondarytype, l* and referencetype, book and not referencetype, section}
set referenceTypeTable2(MA) {referencetype, Audiovisual Material}
set referenceTypeTable2(MNP) {secondarytype, MAN or secondarytype, NTC or secondarytype, PUD}
set referenceTypeTable2(R) {referencetype, Report}
set referenceTypeTable2(RJ) {referencetype, Newspaper}
set referenceTypeTable2(TD) {referencetype, Thesis}

set totalNumberOfSearches 0

######### List of figures to be updated #########
# set figureToBeUpdatedList {ingestYear publicationYear thesisPublicationYear thesisVivaPublicationYear referenceType currentYearReferenceType accessYear}
set figureToBeUpdatedList {ingestYear}
set figureToBeUpdatedList {publicationYear}
set figureToBeUpdatedList {thesisPublicationYear}
set figureToBeUpdatedList {thesisVivaPublicationYear}
set figureToBeUpdatedList {currentYearReferenceType}
set figureToBeUpdatedList {accessYear}
set figureToBeUpdatedList {}
set figureToBeUpdatedList {referenceType}

if {[[lsearch $figureToBeUpdatedList ingestYear]] != -1} {
set totalNumberOfSearches [[expr $totalNumberOfSearches + [[llength $ingestYearList]] * 2]]
set numberOfRecordsPerIngestYear 0
set numberOfFullTextPerIngestYear 0
foreach ingestYear $ingestYearList {
set searchExpression "repository */$ingestYear/* and hostcollection, *"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfRecordsPerIngestYearList $number
incr numberOfRecordsPerIngestYear $number
set searchExpression "repository */$ingestYear/* and size, * and hostcollection, *"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfFullTextPerIngestYearList $number
incr numberOfFullTextPerIngestYear $number
}
}

if {[[lsearch $figureToBeUpdatedList publicationYear]] != -1} {
set totalNumberOfSearches [[expr $totalNumberOfSearches + [[llength $publicationYearList]] * 2]]
set numberOfRecordsPerPublicationYear 0
set numberOfFullTextPerPublicationYear 0
foreach publicationYear $publicationYearList {
set searchExpression "repository */$currentYear/* and year, $publicationYear and hostcollection, *"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfRecordsPerPublicationYearList $number
incr numberOfRecordsPerPublicationYear $number
set searchExpression "repository */$currentYear/* and year, $publicationYear and size, * and hostcollection, *"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfFullTextPerPublicationYearList $number
incr numberOfFullTextPerPublicationYear $number
}
}

if {[[lsearch $figureToBeUpdatedList thesisPublicationYear]] != -1} {
set totalNumberOfSearches [[expr $totalNumberOfSearches + [[llength $publicationYearList]] * 2]]
set numberOfThesisRecordsPerPublicationYear 0
set numberOfThesisFullTextPerPublicationYear 0
foreach publicationYear $publicationYearList {
set searchExpression "year, $publicationYear and referencetype, Thesis"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfThesisRecordsPerPublicationYearList $number
incr numberOfThesisRecordsPerPublicationYear $number
set searchExpression "year, $publicationYear and referencetype, Thesis and size, *"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfThesisFullTextPerPublicationYearList $number
incr numberOfThesisFullTextPerPublicationYear $number
}
}

if {[[lsearch $figureToBeUpdatedList referenceType]] != -1} {
	set totalNumberOfSearches [[expr $totalNumberOfSearches + [[llength $referenceTypeList]] * 2]]
	set numberOfRecordsPerReferenceType 0
	set numberOfFullTextPerReferenceType 0
	foreach referenceType $referenceTypeList {
		set searchExpression "$referenceTypeTable2($referenceType) and hostcollection, *"
		set number [[DisplayNumberOfEntries2 $searchExpression]]
		lappend numberOfRecordsPerReferenceTypeList $number
		incr numberOfRecordsPerReferenceType $number
		set searchExpression "$referenceTypeTable2($referenceType) and size, * and hostcollection, *"
		set number [[DisplayNumberOfEntries2 $searchExpression]]
		lappend numberOfFullTextPerReferenceTypeList $number
		incr numberOfFullTextPerReferenceType $number
	}
}

if {[[lsearch $figureToBeUpdatedList currentYearReferenceType]] != -1} {
set totalNumberOfSearches [[expr $totalNumberOfSearches + [[llength $referenceTypeList]] * 2]]
set numberOfRecordsPerCurrentYearReferenceType 0
set numberOfFullTextPerCurrentYearReferenceType 0
foreach referenceType $referenceTypeList {
set searchExpression "$referenceTypeTable2($referenceType) and repository */$currentYear/* and hostcollection, *"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfRecordsPerCurrentYearReferenceTypeList $number
incr numberOfRecordsPerCurrentYearReferenceType $number
set searchExpression "$referenceTypeTable2($referenceType) and repository */$currentYear/* and size, * and hostcollection, *"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfFullTextPerCurrentYearReferenceTypeList $number
incr numberOfFullTextPerCurrentYearReferenceType $number
}
}

if {[[lsearch $figureToBeUpdatedList thesisVivaPublicationYear]] != -1} {
set totalNumberOfSearches [[expr $totalNumberOfSearches + [[llength $publicationYearList]] * 2]]
set numberOfThesisRecordsPerVivaPublicationYear 0
set numberOfThesisFullTextPerVivaPublicationYear 0
foreach vivaPublicationYear $vivaPublicationYearList {
set searchExpression "date, $vivaPublicationYear and referencetype, Thesis"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfThesisRecordsPerVivaPublicationYearList $number
incr numberOfThesisRecordsPerVivaPublicationYear $number
set searchExpression "year, $vivaPublicationYear and referencetype, Thesis and size, *"
set number [[DisplayNumberOfEntries2 $searchExpression]]
lappend numberOfThesisFullTextPerVivaPublicationYearList $number
incr numberOfThesisFullTextPerVivaPublicationYear $number
}
}


if {[[lsearch $figureToBeUpdatedList accessYear]] != -1} {
set patternList {2001 2002 2003 2004 2005 2006 2007 2008 2009}
set yearList {2001 2002 2003 2004 2005 2006 2007 2008 2009}
set histogram [[CreateAccessHistogram {sid.inpe.br/bibdigital@80/2006/04.07.15.50.13 sid.inpe.br/bibdigital@80/2006/11.11.23.17} $patternList $siteList]]
set totalNumberOfAccess 0
foreach access $histogram {
incr totalNumberOfAccess $access
}
}


set hei 0.2
# set dxticks 1.2 ;# 9 bars
set dxticks 1.08	;# 10 bars
set barWidth 0.40

set barRed1 130; set barGreen1 130; set barBlue1 230
set barRed2 30; set barGreen2 30; set barBlue2 130

]]

\\end{comment}

\\input{./preamble} %% faça as modificações pertinentes no arquivo configuracao.tex

\\begin{document}

\\input{./document}

\\begin{flushleft}
\\renewcommand{\\baselinestretch}{0.9}
\\footnotesize
\\href{http://$localSite/update/$thisRepository?languagebutton=pt-BR}{Atualize este relatório}\\\\
(última data de atualização: [[clock format [[clock seconds]] -format "%d/%m/%Y às %H:%M"]]).
\\end{flushleft}

\\end{document}
}

[[
set dynamicList {}

# Figure 1
if {[[lsearch $figureToBeUpdatedList ingestYear]] != -1} {
lappend dynamicList {ingestYearBar.dat}
lappend dynamicList \
[[
foreach {firstSequenceItem xmax ymax dyticks} [[ComputeAxisParameters $dxticks $barWidth $ingestYearList $numberOfRecordsPerIngestYearList]] {break}
set graphymove 0.3
set graphxsize 15.4
set graphysize 5.8
CreateDataSet [[CreateSequence [[llength $ingestYearList]] $firstSequenceItem $dxticks]] $numberOfRecordsPerIngestYearList $numberOfFullTextPerIngestYearList
]]
lappend dynamicList {ingestYearBar.gle}
lappend dynamicList \
"
! size 15.4 6.0	! size of the paper
size $graphxsize [[expr $graphysize * 0.92 + $graphymove]]

set font ss lwidth 0.01
set alabeldist .8

barRed1 = $barRed1
barGreen1 = $barGreen1
barBlue1 = $barBlue1
barRed2 = $barRed2
barGreen2 = $barGreen2
barBlue2 = $barBlue2

include \"./color.gle\"
! include \"barstyles.gle\"
include \"./library.gle\"

amove 0 $graphymove
begin graph
size $graphxsize $graphysize
center
data   \"ingestYearBar.dat\"
xtitle \"Ano de inser\\c{c}\\~ao\"
ytitle \"N\\'umero de itens\"
xaxis min 0 max $xmax
xnames $ingestYearList
xticks off
yaxis dticks $dyticks dsubticks $dyticks min 0 max $ymax
x2axis off
y2axis off
xlabels hei $hei
ylabels hei $hei
bar d1,d2 width $barWidth dist [[expr $barWidth + 0.04]] style colormap1,colormap2
end graph

begin key
justify bc
absolute (pagewidth()/2) 0
hei $hei
nobox
boxcolor clear
fill rgb255($barRed1,$barGreen1,$barBlue1) text \"Registro - Total: $numberOfRecordsPerIngestYear\"
fill rgb255($barRed2,$barGreen2,$barBlue2) text \"Texto completo - Total: $numberOfFullTextPerIngestYear\"
end key
"
}

# Figure 2
if {[[lsearch $figureToBeUpdatedList publicationYear]] != -1} {
lappend dynamicList {publicationYearBar.dat}
lappend dynamicList \
[[
foreach {firstSequenceItem xmax ymax dyticks} [[ComputeAxisParameters $dxticks $barWidth $publicationYearList $numberOfRecordsPerPublicationYearList]] {break}
set graphymove 0.3
set graphxsize 15.4
set graphysize 5.8
CreateDataSet [[CreateSequence [[llength $publicationYearList]] $firstSequenceItem $dxticks]] $numberOfRecordsPerPublicationYearList $numberOfFullTextPerPublicationYearList
]]
lappend dynamicList {publicationYearBar.gle}
lappend dynamicList \
"
! size 15.4 6.0	! size of the paper
size $graphxsize [[expr $graphysize * 0.92 + $graphymove]]

set font ss lwidth 0.01
set alabeldist .8

barRed1 = $barRed1
barGreen1 = $barGreen1
barBlue1 = $barBlue1
barRed2 = $barRed2
barGreen2 = $barGreen2
barBlue2 = $barBlue2

include \"./color.gle\"
! include \"barstyles.gle\"
include \"./library.gle\"

amove 0 $graphymove
begin graph
size $graphxsize $graphysize
center
data   \"publicationYearBar.dat\"
xtitle \"Ano de publica\\c{c}\\~ao\"
ytitle \"N\\'umero de itens\"
xaxis min 0 max $xmax
xnames $publicationYearList
xticks off
yaxis dticks $dyticks dsubticks $dyticks min 0 max $ymax
x2axis off
y2axis off
xlabels hei $hei
ylabels hei $hei
bar d1,d2 width $barWidth dist [[expr $barWidth + 0.04]] style colormap1,colormap2
end graph

begin key
justify bc
absolute (pagewidth()/2) 0
hei $hei
nobox
boxcolor clear
fill rgb255($barRed1,$barGreen1,$barBlue1) text \"Registro - Total: $numberOfRecordsPerPublicationYear\"
fill rgb255($barRed2,$barGreen2,$barBlue2) text \"Texto completo - Total: $numberOfFullTextPerPublicationYear\"
end key
"
}

# Figure 3
if {[[lsearch $figureToBeUpdatedList thesisPublicationYear]] != -1} {
lappend dynamicList {thesisPublicationYearBar.dat}
lappend dynamicList \
[[
foreach {firstSequenceItem xmax ymax dyticks} [[ComputeAxisParameters $dxticks $barWidth $publicationYearList $numberOfThesisRecordsPerPublicationYearList]] {break}
set graphymove 0.3
set graphxsize 15.4
set graphysize 5.8
CreateDataSet [[CreateSequence [[llength $publicationYearList]] $firstSequenceItem $dxticks]] $numberOfThesisRecordsPerPublicationYearList $numberOfThesisFullTextPerPublicationYearList
]]
lappend dynamicList {thesisPublicationYearBar.gle}
lappend dynamicList \
"
! size 15.4 6.0	! size of the paper
size $graphxsize [[expr $graphysize * 0.92 + $graphymove]]

set font ss lwidth 0.01
set alabeldist .8

barRed1 = $barRed1
barGreen1 = $barGreen1
barBlue1 = $barBlue1
barRed2 = $barRed2
barGreen2 = $barGreen2
barBlue2 = $barBlue2

include \"./color.gle\"
! include \"barstyles.gle\"
include \"./library.gle\"

amove 0 $graphymove
begin graph
size $graphxsize $graphysize
center
data   \"thesisPublicationYearBar.dat\"
xtitle \"Ano de publica\\c{c}\\~ao\"
ytitle \"N\\'umero de itens\"
xaxis min 0 max $xmax
xnames $publicationYearList
xticks off
yaxis dticks $dyticks dsubticks $dyticks min 0 max $ymax
x2axis off
y2axis off
xlabels hei $hei
ylabels hei $hei
bar d1,d2 width $barWidth dist [[expr $barWidth + 0.04]] style colormap1,colormap2
end graph

begin key
justify bc
absolute (pagewidth()/2) 0
hei $hei
nobox
boxcolor clear
fill rgb255($barRed1,$barGreen1,$barBlue1) text \"Registro - Total: $numberOfThesisRecordsPerPublicationYear\"
fill rgb255($barRed2,$barGreen2,$barBlue2) text \"Texto completo - Total: $numberOfThesisFullTextPerPublicationYear\"
end key
"
}

# Figure 4
if {[[lsearch $figureToBeUpdatedList referenceType]] != -1} {
lappend dynamicList {referenceTypeBar.dat}
lappend dynamicList \
[[
foreach {firstSequenceItem xmax ymax dyticks} [[ComputeAxisParameters $dxticks $barWidth $referenceTypeList $numberOfRecordsPerReferenceTypeList]] {break}
set graphymove 2.2
set graphxsize 15.4
set graphysize 5.6
CreateDataSet [[CreateSequence [[llength $referenceTypeList]] $firstSequenceItem $dxticks]] $numberOfRecordsPerReferenceTypeList $numberOfFullTextPerReferenceTypeList
]]
lappend dynamicList {referenceTypeBar.gle}
lappend dynamicList \
"
! size 15.4 7.4	! size of the paper
size $graphxsize [[expr $graphysize * 0.92 + $graphymove]]

set font ss lwidth 0.01
set alabeldist .8

barRed1 = $barRed1
barGreen1 = $barGreen1
barBlue1 = $barBlue1
barRed2 = $barRed2
barGreen2 = $barGreen2
barBlue2 = $barBlue2

include \"./color.gle\"
! include \"barstyles.gle\"
include \"./library.gle\"

amove 0 $graphymove
begin graph
size $graphxsize $graphysize
center
data   \"referenceTypeBar.dat\"
xtitle \"Tipo de refer\\^encia\"
ytitle \"N\\'umero de itens\"
xaxis min 0 max $xmax
xnames $referenceTypeList
xticks off
yaxis dticks $dyticks dsubticks $dyticks min 0 max $ymax
x2axis off
y2axis off
xlabels hei $hei
ylabels hei $hei
bar d1,d2 width $barWidth dist [[expr $barWidth + 0.04]] style colormap1,colormap2
end graph

begin key
justify bc
absolute -1.84+(pagewidth()/2) 0
hei $hei
nobox
[[
set lineList {}
foreach referenceType $referenceTypeList {
lappend lineList "text \"$referenceType\""
}
join $lineList \n
]]
end key

begin key
justify bc
absolute -0.6+(pagewidth()/2) 0
hei $hei
nobox
[[
set lineList {}
foreach referenceType $referenceTypeList {
lappend lineList "text \"- $referenceTypeTable($referenceType)\""
}
join $lineList \n
]]
end key

begin key
justify bc
!absolute 1.7+(pagewidth()/2) 0
absolute 2.2+(pagewidth()/2) 0
hei $hei
nobox
boxcolor clear
fill rgb255($barRed1,$barGreen1,$barBlue1) text \"Registro - Total: $numberOfRecordsPerReferenceType\"
fill rgb255($barRed2,$barGreen2,$barBlue2) text \"Texto completo - Total: $numberOfFullTextPerReferenceType\"
end key
"
}

# Figure 5
if {[[lsearch $figureToBeUpdatedList currentYearReferenceType]] != -1} {
lappend dynamicList {currentYearReferenceTypeBar.dat}
lappend dynamicList \
[[
foreach {firstSequenceItem xmax ymax dyticks} [[ComputeAxisParameters $dxticks $barWidth $referenceTypeList $numberOfRecordsPerCurrentYearReferenceTypeList]] {break}
set graphymove 2.2
set graphxsize 15.4
set graphysize 5.6
CreateDataSet [[CreateSequence [[llength $referenceTypeList]] $firstSequenceItem $dxticks]] $numberOfRecordsPerCurrentYearReferenceTypeList $numberOfFullTextPerCurrentYearReferenceTypeList
]]
lappend dynamicList {currentYearReferenceTypeBar.gle}
lappend dynamicList \
"
! size 15.4 7.4	! size of the paper
size $graphxsize [[expr $graphysize * 0.92 + $graphymove]]

set font ss lwidth 0.01
set alabeldist .8

barRed1 = $barRed1
barGreen1 = $barGreen1
barBlue1 = $barBlue1
barRed2 = $barRed2
barGreen2 = $barGreen2
barBlue2 = $barBlue2

include \"./color.gle\"
! include \"barstyles.gle\"
include \"./library.gle\"

amove 0 $graphymove
begin graph
size $graphxsize $graphysize
center
data   \"currentYearReferenceTypeBar.dat\"
xtitle \"Tipo de refer\\^encia\"
ytitle \"N\\'umero de itens\"
xaxis min 0 max $xmax
xnames $referenceTypeList
xticks off
yaxis dticks $dyticks dsubticks $dyticks min 0 max $ymax
x2axis off
y2axis off
xlabels hei $hei
ylabels hei $hei
bar d1,d2 width $barWidth dist [[expr $barWidth + 0.04]] style colormap1,colormap2
end graph

begin key
justify bc
absolute -1.84+(pagewidth()/2) 0
hei $hei
nobox
[[
set lineList {}
foreach referenceType $referenceTypeList {
lappend lineList "text \"$referenceType\""
}
join $lineList \n
]]
end key

begin key
justify bc
absolute -0.6+(pagewidth()/2) 0
hei $hei
nobox
[[
set lineList {}
foreach referenceType $referenceTypeList {
lappend lineList "text \"- $referenceTypeTable($referenceType)\""
}
join $lineList \n
]]
end key

begin key
justify bc
!absolute 1.7+(pagewidth()/2) 0
absolute 2.2+(pagewidth()/2) 0
hei $hei
nobox
boxcolor clear
fill rgb255($barRed1,$barGreen1,$barBlue1) text \"Registro - Total: $numberOfRecordsPerCurrentYearReferenceType\"
fill rgb255($barRed2,$barGreen2,$barBlue2) text \"Texto completo - Total: $numberOfFullTextPerCurrentYearReferenceType\"
end key
"
}

# Figure 6
if {[[lsearch $figureToBeUpdatedList thesisVivaPublicationYear]] != -1} {
lappend dynamicList {thesisVivaPublicationYearBar.dat}
lappend dynamicList \
[[
foreach {firstSequenceItem xmax ymax dyticks} [[ComputeAxisParameters $dxticks $barWidth $vivaPublicationYearList $numberOfThesisRecordsPerVivaPublicationYearList]] {break}
set graphymove 0.3
set graphxsize 15.4
set graphysize 5.8
CreateDataSet [[CreateSequence [[llength $vivaPublicationYearList]] $firstSequenceItem $dxticks]] $numberOfThesisRecordsPerVivaPublicationYearList $numberOfThesisFullTextPerVivaPublicationYearList
]]
lappend dynamicList {thesisVivaPublicationYearBar.gle}
lappend dynamicList \
"
! size 15.4 7.4	! size of the paper
size $graphxsize [[expr $graphysize * 0.92 + $graphymove]]

set font ss lwidth 0.01
set alabeldist .8

barRed1 = $barRed1
barGreen1 = $barGreen1
barBlue1 = $barBlue1
barRed2 = $barRed2
barGreen2 = $barGreen2
barBlue2 = $barBlue2

include \"./color.gle\"
! include \"barstyles.gle\"
include \"./library.gle\"

amove 0 $graphymove
begin graph
size $graphxsize $graphysize
center
data   \"thesisVivaPublicationYearBar.dat\"
xtitle \"Ano de defesa ou publica\\c{c}\\~ao\"
ytitle \"N\\'umero de itens\"
xaxis min 0 max $xmax
xnames $publicationYearList
xticks off
yaxis dticks $dyticks dsubticks $dyticks min 0 max $ymax
x2axis off
y2axis off
xlabels hei $hei
ylabels hei $hei
bar d1,d2 width $barWidth dist [[expr $barWidth + 0.04]] style colormap1,colormap2
end graph

begin key
justify bc
absolute (pagewidth()/2) 0
hei $hei
nobox
boxcolor clear
fill rgb255($barRed1,$barGreen1,$barBlue1) text \"TDs defendidas - Total: $numberOfThesisRecordsPerVivaPublicationYear\"
fill rgb255($barRed2,$barGreen2,$barBlue2) text \"TDs publicadas - Total: $numberOfThesisFullTextPerVivaPublicationYear\"
end key
"
}

# Figure 7
if {[[lsearch $figureToBeUpdatedList accessYear]] != -1} {
lappend dynamicList {accessYearBar.dat}
lappend dynamicList \
[[
set dxticks 0.50
set barWidth 0.38

foreach {firstSequenceItem xmax ymax dyticks} [[ComputeAxisParameters $dxticks $barWidth $yearList $histogram]] {break}
set graphymove 0.0
set graphxsize 7.6
set graphysize 5.8
CreateDataSet [[CreateSequence [[llength $yearList]] $firstSequenceItem $dxticks]] $histogram
]]
lappend dynamicList {accessYearBar.gle}
lappend dynamicList \
"
!size 5 5	! size of the paper
size $graphxsize [[expr $graphysize * 0.92 + $graphymove]]

set font ss lwidth 0.01
set alabeldist .8

barRed1 = $barRed1
barGreen1 = $barGreen1
barBlue1 = $barBlue1

include \"./color.gle\"
! include \"barstyles.gle\"
include \"./library.gle\"

amove 0 $graphymove
begin graph
size $graphxsize $graphysize
center
data   \"accessYearBar.dat\"
!xtitle \"M\\^eses\"
xtitle \"Ano\"
ytitle \"N\\'umero de acessos\"
xaxis min 0 max $xmax
xnames $yearList
xticks off
yaxis dticks $dyticks dsubticks $dyticks min 0 max $ymax
x2axis off
y2axis off
xlabels hei .16
ylabels hei .16
!bar d1,d2 width $barWidth dist [[expr $barWidth + 0.04]] style colormap1,colormap2
bar d1 width $barWidth style colormap1
end graph

begin key
justify bc
absolute pagewidth()/2 0
hei 0.16
nobox
boxcolor clear
text \"N\\'umero total de acessos: $totalNumberOfAccess\"
end key
"
}

set dynamicList
]]
}
