Hi,
This may be a feature request: is there any way to set alignment (e.g. Left-Bottom) when using annotate()? It seems that the justification might be different in my script than when I use the tool interactively.
Joleen
annotate
Re: annotate
Bug Report
1.) line/element fails:
1.) line/element fails:
Re: annotate
Hi Joleen,
I guess we missed that part of the documentation. You can use the alignment keyword.
alignment=(horizontal,vertical)
horizontal = 'left', 'center' or 'right'
vertical= 'top', 'center' or 'bottom'
Example:
alignment=('left','top')
I guess we missed that part of the documentation. You can use the alignment keyword.
alignment=(horizontal,vertical)
horizontal = 'left', 'center' or 'right'
vertical= 'top', 'center' or 'bottom'
Example:
alignment=('left','top')
Re: annotate
Hi Joleen,
You specified decimal values for line and element and in the case of line, a negative number. Is there a reason why you'd want to specify those types of values?
Rick
You specified decimal values for line and element and in the case of line, a negative number. Is there a reason why you'd want to specify those types of values?
Rick
Re: annotate
Hi Rick,
Apparently not the same as using the draw freely x,y option? I tried figuring out what I wanted to use by first testing with the interactive control.
Joleen
Apparently not the same as using the draw freely x,y option? I tried figuring out what I wanted to use by first testing with the interactive control.
Joleen
Re: annotate
Hi Joleen -
It appears that the alignment keyword of annotate works opposite what it does through the Drawing Control widget. Therefore, if you look at the Properties of an item drawn through the Drawing Controls and the alignment is (left, bottom), through scripting you would need to do alignment=('right','top').
I have written this up as McIDAS-V Inquiry number 1615
http://mcidas.ssec.wisc.edu/inquiry-v/?inquiry=1615
Thanks for reporting this -
Bob Carp
It appears that the alignment keyword of annotate works opposite what it does through the Drawing Control widget. Therefore, if you look at the Properties of an item drawn through the Drawing Controls and the alignment is (left, bottom), through scripting you would need to do alignment=('right','top').
I have written this up as McIDAS-V Inquiry number 1615
http://mcidas.ssec.wisc.edu/inquiry-v/?inquiry=1615
Thanks for reporting this -
Bob Carp
Re: annotate
Hi Bob,
I don't think this would fit under the same inquiry. When "Draw Freely" is used interactively, choices for placement include x/y, x/y/z, lat/lon, lat/lon/alt options. Once the glyph is written on the screen, a user can
1.) Use the Drawing Control Layer Control select Shapes tab.
2.) Double Click on a Glyph
3.) In the Glyph Properties Control select the Points tab
4.) Write Points or just write them down.
It seems that the lat/lon option is essentially what is used in scripting, but the x,y option is not. I won't be the only one to try to use those points in a script. I think that the most reliable points will be lat/lon, line/elem, but x,y could also work if the user is aware of the window size and uses that same size in a script.
Joleen
I don't think this would fit under the same inquiry. When "Draw Freely" is used interactively, choices for placement include x/y, x/y/z, lat/lon, lat/lon/alt options. Once the glyph is written on the screen, a user can
1.) Use the Drawing Control Layer Control select Shapes tab.
2.) Double Click on a Glyph
3.) In the Glyph Properties Control select the Points tab
4.) Write Points or just write them down.
It seems that the lat/lon option is essentially what is used in scripting, but the x,y option is not. I won't be the only one to try to use those points in a script. I think that the most reliable points will be lat/lon, line/elem, but x,y could also work if the user is aware of the window size and uses that same size in a script.
Joleen
Re: annotate
Hi Joleen -
I wrote up inquiry 1616 to cover adding the ability to specify x/y values for location in annotate().
http://mcidas.ssec.wisc.edu/inquiry-v/?inquiry=1616
Thanks for the request -
Bob
I wrote up inquiry 1616 to cover adding the ability to specify x/y values for location in annotate().
http://mcidas.ssec.wisc.edu/inquiry-v/?inquiry=1616
Thanks for the request -
Bob
Re: annotate
Hi Bob,
You might want to add something about looking into using line/elem in the interactive control as well. If scripting really will replicate the interactive tool, this would be an opportunity.
Joleen
You might want to add something about looking into using line/elem in the interactive control as well. If scripting really will replicate the interactive tool, this would be an opportunity.
Joleen
Re: annotate
Thanks for the suggestion. I generalized the inquiry to make the options for Location/Coordinates the same between the GUI and in scripting. This includes adding Line/Element to the Coordinates dropdown in the Drawing Control widget and adding X/Y to the options for annotate().
I will ask about specifying a z-level through annotate() to see if this is possible, or if this is another feature request to make this possible through scripting. The default z-level through scripting appears to be 0.
Thanks again -
Bob
I will ask about specifying a z-level through annotate() to see if this is possible, or if this is another feature request to make this possible through scripting. The default z-level through scripting appears to be 0.
Thanks again -
Bob