Places annotations over globe
Hello ,
How can I place annotations or vectors layers over globe in this canvas?
thanks Jai
I will add a jupyter notebook for this, but essentially if you have two variables (data1, data2) on the same grid
import vcs
x=vcs.init()
vec = vcs.createvector()
x.plot(data1,data2,vec)
To control option on vectors
vec.list()
will show you the list of options.
Annotation are made via templates
t = vcs.createtemplate()
# Move the title
t.title.x = .5
t.title.y = .8
data.title = "My Title"
x.plot(data1,data2,vec,t)
Hello,
Actually i also want to place place names like country names, major river names, mountains etc on the base map.
thanks Jai
ok I will create a jupyter notebook to explain this as well. I'll post the link here for now:
import vcs
tmpl = vcs.createtemplate()
gm = vcs.createisofill() # or anyone you want
lon1, lon2 = -180, 180
lat1, lat2 = -90, 90
gm.datawc_x1 = lon1
gm.datawc_x2 = lon2
gm.datawc_y1 = lat1
gm.datawc_y2 = lat2
x.plot(data,gm,tmpl)
txt = vcs.createtext()
txt.viewport = [tmpl.data.x1,tmpl.data.x2,tmpl.data.y1,tmpl.data.y2] # match drawing are to the one of the data
txt.worldcoordinate = [gm.datawc_x1,gm.datawc_x2,gm.datawc_y1,gm.datawc_y2] # match coordinate to the ones used when plotting data
txt.string = ["Livermore, CA"]
txt.x = [-121.768]
txt.y=[37.6819]
txt.color="red"
txt.height =23
txt.halign = "center"
# more can be configured
txt.list()
x.plot(txt)
Hello,
Thanks for sharing this . It works well. So , like that we can go on adding information as n when required.
thanks