How to plot transparent lines / shades in xmgrace / UVCDAT / pygrace

Dear All,

Problem :

How to plot transparent lines or shaded region in xmgrace ?

For example, look at the below plot.

Solution :

I had to plot transparent lines in xmgrace wherever overlaps occurs.

In Grace / xmgrace there is no transparent setting.

https://github.com/pygrace/pygrace/issues/4 suggest 3 ways to achieve this.

I took the 2nd option such as “create three different regions“.
i.e.
1. Regions of Overlap between two data sets a & b
2. Only data set a excluding overlap
3. Only data set b excluding overlap

I written the function “getOverlap
Sourcehttps://gist.github.com/arulalant/b7a1cef170a2e25571f7

Now see the below plot and compare with the above one, you can see different color in the overlap regions.

Result Plot:
Same plot with overlap region with different color (chosen between red and black color)

Same getOverlap function useful to plot the shaded overlap region also.

To set custom RGB color in grace look my previous post here

 

Regards,
Arulalan.T

Posted in xmgrace | Tagged , , , , , , , | Leave a comment

How to set custom / more (R, G, B) colors in Grace, Xmgrace UV-CDAT

Hello there,

If you want to set custom or more R,G,B colors in Xmgrace or Grace do the following steps.

Step 1 : go to /usr/share/grace

$ cd /usr/share/grace

Step 2:

there is a file named as gracerc.user

Now edit that file with sudo or root permission and paste the below lines into that file.

map color 0 to (255, 255, 255), “white”

map color 1 to (0, 0, 0), “black”
map color 2 to (255, 0, 0), “red”
map color 3 to (0, 255, 0), “green”
map color 4 to (0, 0, 255), “blue”
map color 5 to (255, 255, 0), “yellow”

map color 6 to (188, 143, 143), “brown”
map color 7 to (220, 220, 220), “grey”
map color 8 to (148, 0, 211), “violet”
map color 9 to (0, 255, 255), “cyan”
map color 10 to (255, 0, 255), “magenta”

map color 11 to (255, 165, 0), “orange”
map color 12 to (114, 33, 188), “indigo”
map color 13 to (103, 7, 72), “maroon”
map color 14 to (64, 224, 208), “turquoise”
map color 15 to (0, 139, 0), “green4″

Now you save that file and go to open grace gui or plot your colors with the above 15 index to chose appropriate color.

* Those values inside the tuple is rgb values.
* The number after “map color” is the color index
* and after the tuple the string is any name u like

If you want to add custom or more colors then add lines like below.
Here I added light black color with index 16 and its rgb value.

Likewise added for light red color with index 17 and its rgb value.

map color 16 to (100, 90, 90), “lblack”
map color 17 to (250, 90, 90), “lred”

Append the above 2 custom colors into /usr/share/grace/gracerc.user

* add as many colors as u like !

To choose (R, G, B) colors you may use the following online rgb color pickers.

http://www.rapidtables.com/web/color/color-picker.htm

http://www.colorpicker.com/

:-)

Posted in UVCDAT | Tagged , , , , , , , | Leave a comment

Plot Special / Scientific Symbols in Xmgrace, UV-CDAT

Xmgrace is a very nice piece of software to create 2-D line plots.

xmgrace module is available in ‘genutil‘ module in uv-cdat.

Here explained how to plot special characters in xmgrace.

  • Subscript, superscript
    x-squared: x\S2\N
    subscript: 3\s10\N
  • Special symbols, example: Angstrom symbol
    \cE\C
  • Special symbols, example: degree symbol
    \c0\C
  • For other characters, look at the below table or list here: ascii table with low and high characters. Just use the character from the ASCII Character column between \c and \C to produce the one from the Special/Scientific Symbols column.
  • In the link http://blog.louic.nl/files/ascii.html the most scientific characters are highlighted. 
  • In general, \cASCII Character\C will plot appropriate Special/Scientific Symbol (which are listed in the below table) in xmgrace using UVCDAT
  • Note \c and \C are escape characters.

 


>>> from genutil import xmgrace

>>> x = xmgrace.init()

>>> stitle = 'Unit : \c0\CCelsius year\S-1'

>>> x.add_string(x=0.5, y=0.9, text=stitle)


Output plot of above snippet

grace-eg

 

ASCII No ASCII Character Special / Scientific Symbols
33 ! ¡
34 ¢
35 # £
36 $ ¤
37 % ¥
38 & ¦
39 §
40 ( ¨
41 ) ©
42 * ª
43 + «
44 , ¬
45 -
46 . ®
47 / ¯
48 0 °
49 1 ±
50 2 ²
51 3 ³
52 4 ´
53 5 µ
54 6
55 7 ·
56 8 ¸
57 9 ¹
58 : º
59 ; »
60 < ¼
61 = ½
62 > ¾
63 ? ¿
64 @ À
65 A Á
66 B Â
67 C Ã
68 D Ä
69 E Å
70 F Æ
71 G Ç
72 H È
73 I É
74 J Ê
75 K Ë
76 L Ì
77 M Í
78 N Î
79 O Ï
80 P Ð
81 Q Ñ
82 R Ò
83 S Ó
84 T Ô
85 U Õ
86 V Ö
87 W ×
88 X Ø
89 Y Ù
90 Z Ú
91 [ Û
92 \ Ü
93 ] Ý
94 ^ Þ
95 _ ß
96 ` à
97 a á
98 b â
99 c ã
100 d ä
101 e å
102 f æ
103 g ç
104 h è
105 i é
106 j ê
107 k ë
108 l ì
109 m í
110 n î
111 o ï
112 p ð
113 q ñ
114 r ò
115 s ó
116 t ô
117 u õ
118 v ö
119 w ÷
120 x ø
121 y ù
122 z ú
123 { û
124 | ü
125 } ý
126 ~ þ

Reference Link :  http://blog.louic.nl/?p=249

 

Posted in UVCDAT | Tagged , , , , , , , , | Leave a comment

Release : txt2unicode converter v4.0 velli

Dear All,

This velli v4.0 release of txt2unicode has 25 Tamil encodes to encode2unicode converters and unicoce2encode converters along with auto find encode functions.

I have written txt2unicode converter which will convert any type of encode to unicode in agaram v1.0 version. Read blog post about v1.0 .

In my second release iagram v2.0, I added reverse engine unicode to encode converters Read blog post about v2.0 and v3.0 .

Now I released velli v4.0 version.

Whats new in velli v4.0 ?

* added 5 more Tamil encodes.

It supports for following Tamil encodes.

Supported encodes in v3.0 are
1. anjal,
2. bamini,
3. boomi,
4. dinakaran,
5.dinamani,
6.dinathanthy,

7.kavipriya,
8.murasoli,
9.mylai,
10.nakkeeran,
11.roman,
12.tab,
13.tam,
14.tscii
15. pallavar,
16. indoweb,
17. koeln,
18. libi,
19. oldvikatan &
20. webulagam
Supported new encodes in v4.0 velli :
Along with v3.0 20 encodes, following new 5 encodes are added

21. Diacritic,
22. Shreelipi,
23. Softview,
24. Tace &
25. Vanavil

Because of these new 5 encodes, the all 25 encodes no of unique compound characters are changed. All common compound characters among 25 encodes are increased from 916 to 1066 in this v4.0. Read about it here

txt2unicode source repo : https://github.com/arulalant/txt2unicode

Suggestions are welcome. :-)

Regards,
Arulalan.T

Posted in Contribution, Release, Software, Tamil | Tagged , , , , , , , , , , , , | 1 Comment

Release : txt2unicode converter v3.0 ugaram

Dear All,

I have written txt2unicode converter which will convert any type of encode to unicode in agaram v1.0 version. Read blog post about v1.0 .

In my second release iagram v2.0, I added reverse engine unicode to encode converters Read blog post about v2.0 .

Now I released ugaram v3.0 uagram version.

Whats new in ugaram v3.0 ?

* add 6 more Tamil encodes.

At the moment it supports for following Tamil encodes same as in agaram v1.0 version.

Supported encodes in v1.0 are
1. anjal,
2. bamini,
3. boomi,
4. dinakaran,
5.dinamani,
6.dinathanthy,
7.kavipriya,
8.murasoli,
9.mylai,
10.nakkeeran,
11.roman,
12.tab,
13.tam &

14.tscii

Supported new encodes in v3.0 uagarm :
Along with v1.0 14 encodes, following new 6 encodes are added

15. pallavar,
16. indoweb,
17. koeln,
18. libi,
19. oldvikatan &
20. webulagam

Because of these new 6 encodes, the all 20 encodes no of unique compound characters are changed. All common compound characters among 20 encodes are increased from 560 to 916 in this v3.0. Read about it here

txt2unicode source repo : https://github.com/arulalant/txt2unicode

Suggestions are welcome. :-)

Regards,
Arulalan.T

Posted in Contribution, Release, Software, Tamil | Tagged , , , , , , , , , , , , | 1 Comment

Release : txt2unicode converter v2.0 igaram

Dear All,

I have written txt2unicode converter which will convert any type of encode to unicode in agaram v1.0 version. Read about v1.0 release here

Now I released igaram v2.0 version.

Whats new in igaram v2.0 ?

* unicode2encode
* unicode2auto

Which are reverse engine converters of agaram v1.0 version.
Using this we can can convert unicode to any type of encodes.

At the moment it supports for following Tamil encodes same as in agaram v1.0 version.

Supported encodes are
1. anjal,
2. bamini,
3. boomi,
4. dinakaran,
5.dinamani,
6.dinathanthy,
7.kavipriya,
8.murasoli,
9.mylai,
10.nakkeeran,
11.roman,
12.tab,
13.tam  &

14.tscii

unicode2auto” function is just reverse of “auto2unicode” which will find input sample_encode text’s encode automatically and convert the input unicode_text to found encode. It can find 11 encodes out of 14 above encodes.

Look at demo for “auto2unicode” and “unicode2auto

txt2unicode source repo : https://github.com/arulalant/txt2unicode

Suggestions are welcome. :-)

Regards,
Arulalan.T

Posted in Contribution, Release, Software, Tamil | Tagged , , , , , , , , , , , , | 2 Comments

Release : txt2unicode converter v1.0 agaram

Dear All,

I have written txt2unicode converter v1.o agarm release which will convert any type of encode to unicode. At the moment it will convert only Tamil encodes.

Supported encodes are
1. anjal, 2. bamini,
3. boomi,
4. dinakaran,
5.dinamani,
6.dinathanthy,
7.kavipriya,
8.murasoli,
9.mylai,
10.nakkeeran,
11.roman,
12.tab,
13.tam &
14.tscii

Also I have written “auto2unicode” function which will find input text’s encode automatically and convert to unicode. It can find 11 encodes out of 14 above encodes.

I took tscii sample input from here and tested out.

auto2unicode” function able to find “tscii” encode and convert to unicode successfully.

I need remaining 13 encodes sample text to test it.

Suggestions are welcome.

txt2unicode source repo : https://github.com/arulalant/txt2unicode

:-)

Regards,
Arulalan.T

Posted in Contribution, Release, Software, Tamil | Tagged , , , , , , , , , , , , | 3 Comments

Release : txt2ipa converter v0.1

Dear All,

Today I created txt2ipa converter in python.

Here I found project anunaadam which is created by Mr.Vinodh Rajan.

From that I just modified two needed php scripts into python.
Actually I did nothing big!.

But I am going to add option in my converter with the option as
“any language text -> ipa -> any other language text”

txt2ipa Repo : https://github.com/arulalant/txt2ipa

Todo :

  • Add other Indian Languages for ipa converter
  • Any language to any language phonetic alphabet converter

Credits :

Thanks to Mr.Vinodh Rajan and my elder brother Shrinivasan.T who pointed about anunaadam project.

Future Direction [Dream Project] :

My dream project is that I need to create one desktop/web/mobile app which will convert one language word string to another language word string with same meaning, not just translate characters only !!! Then after convert to second language word strings which has same meaning of first language word strings, play it via sound files! So that one can convert text from first language to audio in second language with same meaning… Even more one can speak to app in their fist language and it has to convert/play second language audio with same meaning… No more language problem to any one !

This txt2ipa v0.1 converter is first step towards my above dream project.

Quote :

Great dreams of great dreamers are always transcended.

- A. P. J. Abdul Kalam, former President of India

Regards,
Arulalan.T

Posted in Contribution, Python, Release, Software, Tamil | Tagged , , , , , , , , , , | 1 Comment

Reason : Why Climatology beings from 1979 onwards

Reasons behind climatology beings from 1979 onwards,

Most of the global region observation relying on satellite measurements data.

1) Satellite measurements of ice areas began in 1979

Notz Dirk, Marotzke Jochem, 2012, Observations reveal external driver
for Arctic sea-ice retreat, Geophysical Research Letters, VOL. 39, L08502, doi:10.1029/2012GL051094 Link

The above paper says,

2) The pre-1953 data is pretty useless, much of it is obviously not

changing from year to year. The variation in the Hadley Centre’s Sea Ice and Sea Surface (HadISST) Temperature dataset changes pretty radically at 1979 onwards.

3) From 1979 onwards the HadISST data set is primarily based on

satellite observations. We find across the 1978/1979 boundary an
unusually large increase in sea-ice extent in March and an unusually
large decrease in sea-ice extent in September.

Source : http://wattsupwiththat.com/2012/05/03/icy-arctic-variations-in-variability/

In above link you can see the plots which shows observation variability rapid cut-off at 1979 onwards.

4) P. Nabat et al., 2013, A 4-D climatology (1979–2009) of the monthly tropospheric aerosol optical depth distribution over the Mediterranean region from a comparative evaluation and blending of remote sensing and model products, Atmos. Meas. Tech., 6, 1287-1314, doi:10.5194/amt-6-1287-2013 Link

The above paper says,

They extend the 2003–2009 reconstruction to the past up to 1979 using the 2003–2009 average and applying the decreasing trend in sulfate aerosols from LMDz-OR-INCA. Finally optical properties of the different aerosol types in this region are proposed from Mie calculations so that this reconstruction can be included in regional climate models for aerosol radiative forcing and aerosol-climate studies.

i.e. Upto 1979 observed / satellite data are reconstructed using after 1979th year observed dataset.

 

Posted in Climate | Tagged , , , , , , | Leave a comment

How to insatll clim.pact inside R path in Ubuntu

Dear All,

To install clim.pact packages inside our R path follow the below steps.

Step 0 : Install R
********************
Download latest R source tar ball from http://cran.r-project.org/sources.html and extract it.

Then go inside to that directory and run the following three commands as root or sudo user.

$ ./configure
$ make
$ sudo make install

Step 1 : Install Dependencies
**********************************

We need "ncdf" & "akima" additional packages to be installed inside R.

To install ncdf correctly we need to install the following packages in our machine.

In Ubuntu follow the below step.

$ apt-get install libnetcdf-dev udunits-bin libudunits2-dev

Then type R command in terminal

$ R
> install.packages(‘akima’)

> install.packages(‘ncdf’)

Choose any one of the country to select mirror and download, install the corresponding packages inside R.

Step 2 : Install clim.pact package inside R

***************************************************

Download latest ‘clim.pact’ tar ball from http://cran.r-project.org/src/contrib/Archive/clim.pact/

Then go to the downloaded directory in terminal then issue the following command.

$ sudo R CMD INSTALL clim.pact_2.3-10.tar.gz

or

$ su
# R CMD INSTALL clim.pact_2.3-10.tar.gz

Thats it. We installed clim.pact package successfully inside our R path.

Note : In the file name specify the downloaded version clim.pack_version.tar.gz

Step 3 : Test
***************
Go to R shell command and load ‘clim.pact’ package as follows.

$ R
> library(clim.pact)
Loading required package: ncdf
Loading required package: akima

Enjoy !

Regards,
Arulalan.T,
Project Associate,
Centre for Atmospheric Sciences,
Indian Institute of Technology Delhi.

Posted in Uncategorized | Tagged , , | 3 Comments