Direction du vent
- TiToine
- Site Admin
- Messages : 3356
- Inscription : lun. mars 20, 2006 11:16 am
- Localisation : Montréal
- Contact :
Je vois que GW ne te fais pas perdre ton latin Réné 
Il faut ajouter dans la balise labels un attribut nommé labels avec les directions. Ensuite, il faut passer le nombre de majorticks au nombre de directions que l'on a donné. Exemple dans la feuille tab-full-graph.xml, dans le y1axis du second lineplot, on remplace labels et ticks par :
<labels labels="N;N0;0;S0;S;SE;E;NE" labelinterval="1" angle="0" format=".1" side="2" hide="0" >
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
</labels>
<ticks majorticks="8" minorticks="0" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
J'espère ne pas mettre trompé dans le sens N;N0;0;S0;S;SE;E;NE

Il faut ajouter dans la balise labels un attribut nommé labels avec les directions. Ensuite, il faut passer le nombre de majorticks au nombre de directions que l'on a donné. Exemple dans la feuille tab-full-graph.xml, dans le y1axis du second lineplot, on remplace labels et ticks par :
<labels labels="N;N0;0;S0;S;SE;E;NE" labelinterval="1" angle="0" format=".1" side="2" hide="0" >
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
</labels>
<ticks majorticks="8" minorticks="0" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
J'espère ne pas mettre trompé dans le sens N;N0;0;S0;S;SE;E;NE
si si, c'est l'inverse. En plus, majorstick doit être à 9 (il y a 8 intervals, mais neuf traits.
Voilà ma modif :
<labels labels="N;NE;E;SE;S;SO;O;NO;N" labelinterval="1" angle="0" format=".1" side="2" hide="0" >
<font color="FFFF0000" facename="Arial" size="12" weight="400" italic="1" />
</labels>
<ticks majorticks="9" minorticks="0" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
Un seul petit pb : le N de la premiére et derniére ligne est un peu "rogné". Il faudra que je cherche pourquoi.
merci
Voilà ma modif :
<labels labels="N;NE;E;SE;S;SO;O;NO;N" labelinterval="1" angle="0" format=".1" side="2" hide="0" >
<font color="FFFF0000" facename="Arial" size="12" weight="400" italic="1" />
</labels>
<ticks majorticks="9" minorticks="0" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
Un seul petit pb : le N de la premiére et derniére ligne est un peu "rogné". Il faudra que je cherche pourquoi.
merci
Dernière modification par lipban le dim. déc. 24, 2006 4:01 pm, modifié 1 fois.
Re:
C'est ce que je viens de faire, mais les graduations se trouvent à l'intérieur du graphique.lipban a écrit :si si, c'est l'inverse. En plus, majorstick doit être à 9 (il y a 8 intervals, mais neuf traits.
Voilà ma modif :
<labels labels="N;NE;E;SE;S;SO;O;NO;N" labelinterval="1" angle="0" format=".1" side="2" hide="0" >
<font color="FFFF0000" facename="Arial" size="12" weight="400" italic="1" />
</labels>
<ticks majorticks="9" minorticks="0" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
Un seul petit pb : le N de la premiére et derniére ligne est un peu "rogné". Il faudra que je cherche pourquoi.
merci
Quelle valeur vaut-il changer ?
Voici mon tab-wind-pb.xml :
<!-- ================= First Lineplot ================= -->
<lineplot width="880" height="300" shadow="0" position-x="10" position-y="10" margin-top="40" margin-right="70" margin-bottom="40" margin-left="65">
<xaxis color="FF000000" grid="1" autoscale="0" min="0" max="0">
<labels labelinterval="1" angle="0" side="2" hide="0">
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
</labels>
<ticks majorticks="7" minorticks="4" side="32" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
</xaxis>
<y1axis color="FF000000" grid="1" autoscale="1" min="0" max="0" titleside="1" titlemargin="35">
<title text="Vitesse du vent ( $UNIT[SPEED] )" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
</title>
<labels labelinterval="1" angle="0" format=".0" side="2" hide="0" >
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
</labels>
<ticks majorticks="5" minorticks="4" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
</y1axis>
<y2axis side="8" color="FF000000" grid="0" autoscale="0" min="0" max="360" titleside="8" titlemargin="40">
<title text="Direction du vent ( ° )" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
</title> <labels labels="N;NE;E;SE;S;SO;O;NO;N" labelinterval="1" angle="0" format=".1" side="2" hide="0" >
<font color="FF000000" facename="Arial" size="12" weight="400" italic="0" />
</labels>
<ticks majorticks="9" minorticks="0" side="2" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
</y2axis>
<data>
<wind_speed axisbind="y1axis" legend="Vitesse du vent" color1="66FF0000" color2="33FF0000" antialiasing="1" filled="1" />
<wind_speed axisbind="y1axis" legend="Vitesse du vent" color1="66FF0000" antialiasing="1" filled="0" hidelegend="1" thick="1.2"/>
<wind_gust axisbind="y1axis" legend="Rafales" color1="FFFF0000" antialiasing="1" filled="0" hidelegend="0" thick="1.2"/>
<wind_direction axisbind="y2axis" legend="Direction du vent" color1="FF000000" antialiasing="1" filled="0" hidelegend="0" thick="3" pattern="00000000"/>
</data>
<legend orientation="0" margin="5" width="745" position-x="75" position-y="20" hide="0" shadow="0">
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
<border cornerradius="0" color="55555555" thick="1" />
<background color1="FFBBBBFF" color2="FFFFFFFF" gradient="1" gradient-direction="90"/>
</legend>
<border cornerradius="0" color="55555555" thick="0" />
<background color1="00000000" stretch="1" />
<graphbackground color1="FFCCCCFF" color2="FFFFFFFF" gradient="1" gradient-direction="90" />
</lineplot>
- TiToine
- Site Admin
- Messages : 3356
- Inscription : lun. mars 20, 2006 11:16 am
- Localisation : Montréal
- Contact :
Re: Direction du vent
Change avec ce passage :
<y2axis side="8" color="FF000000" grid="0" autoscale="0" min="0" max="360" titleside="8" titlemargin="40">
<title text="Direction du vent ( ° )" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
</title>
<labels labels="N;NE;E;SE;S;SO;O;NO;N" labelinterval="1" angle="0" format=".1" side="8" hide="0" >
<font color="FF000000" facename="Arial" size="12" weight="400" italic="0" />
</labels>
<ticks majorticks="9" minorticks="0" side="8" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
</y2axis>
Dans la prochaine version les valeurs seront remplacées par les directions. Par exemple side="right" (dans ton cas).
<y2axis side="8" color="FF000000" grid="0" autoscale="0" min="0" max="360" titleside="8" titlemargin="40">
<title text="Direction du vent ( ° )" alignement="20" angle="0">
<font color="FF000000" facename="Arial" size="12" weight="400" italic="1" />
</title>
<labels labels="N;NE;E;SE;S;SO;O;NO;N" labelinterval="1" angle="0" format=".1" side="8" hide="0" >
<font color="FF000000" facename="Arial" size="12" weight="400" italic="0" />
</labels>
<ticks majorticks="9" minorticks="0" side="8" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" />
</y2axis>
Dans la prochaine version les valeurs seront remplacées par les directions. Par exemple side="right" (dans ton cas).