Appending image to polar graph
Mike German
I've run out of ideas on how to do this, so any advice please on incorporating a png image loaded on a PC platform into a polar graph would be appreciated. The image to be loaded is a coatline of the UK with green land and blue sea, black coart outlne and re dot. I load it either as png or raw png with the same result - a black grey colour for land and black sea. I can change the colour back by using explicit colour adjstment, but thats not the problem.
When I append it to an existing polar graph the image is a an upside down mirror image.
If you want the y axis values to increase upward you can reverse the scale for the image wave. An image plot by default has a reversed y axis, but your polar plot doesn't.
March 12, 2023 at 01:40 am - Permalink
Done - Thanks Tony - as easy as that!
March 12, 2023 at 03:19 am - Permalink
In reply to Done - Thanks Tony - as easy… by Mike German
While you are there, how do I get the polar graph grid lines back?
March 12, 2023 at 03:33 am - Permalink
possibly, instead of an image plot, put the image into the bottom draw layer as a picture.
Or you might be able to move the draw objects that make up the grid into an upper draw layer.
March 13, 2023 at 02:03 pm - Permalink
When Igor 9.02 releases there will be a way to define a function that draws into one of the layers that the polar graphs package uses after the package clears the layer and before the package draws. This is an example function:
if( CmpStr(polarGraphName,"PolarGraph0") == 0 ) // only this polar graph
SetDrawEnv/W=$polarGraphName xcoord= rel,ycoord= rel
DrawPICT/RABS/W=$polarGraphName 0,0,1,1,Azimuthal_Hay_1500km_png
endif
End
March 14, 2023 at 05:43 pm - Permalink
Many thanks for making that addition to the next release; I look forward to it.
March 16, 2023 at 04:53 am - Permalink
In reply to When Igor 9.02 releases… by JimProuty
I have been using Jim's method to sucessfully draw a backgound on to my polar plots using one particular image.
Type: Unsigned Byte 8 bit
Rows: 1200 Start: 0 Delta: 8.46668e-05 Units: m
Columns: 1200 Start: 0 Delta: 8.46668e-05 Units: m
Layers: 3 Start: 0 Delta: 1 Units:
Data Units:
Size: 4320648 bytes
Modified: 29/03/2023 14:37:44 Since Last Saved: Yes
Note:
When I try to draw alternative images (with suitable modifications to the code) the method is failing for what seems like an image error as shown in the attachment. Below is the information from the Data Browser
Type: Unsigned Byte 8 bit
Rows: 1200 Start: 0 Delta: 1 Units:
Columns: 1200 Start: 0 Delta: 1 Units:
Layers: 3 Start: 0 Delta: 1 Units:
Data Units:
Size: 4320648 bytes
Modified: 29/03/2023 15:57:01 Since Last Saved: Yes
Note:
Both can be displayed from the Data Browser using New Image.
All are in the same data folder which is set to default.
I have tried changing the deltas using setscale (although I can't see why)
Apending to standard Graphs is the same. So seems something odd with the images ????
None of these have solved the problem - any advice welcome.
March 29, 2023 at 08:52 am - Permalink
Remember that you need to be drawing a picture, not a wave using PolarGraphInitProgBackLayer.
March 29, 2023 at 10:45 am - Permalink