|
images background in contour chart |
Posted by akim on Sep-29-2009 15:41 |
|
sorry my english
hi Peter.
the coding (with vb 6):
=========================================
Set layer = c.addContourLayer(dataX, dataY, dataZ)
Call layer.setContourColor(cd.Transparent)
Call layer.ColorAxis().setColorGradient(True)
Call layer.setSmoothInterpolation(False)
Call layer.setColorAxis(400, 465, cd.TopCenter, 650, cd.Top).setLinearScale(0, MaxVal / 100)
Call c.getPlotArea().setBackground2("Resize of world_map_gif.gif", 5)
Call c.getPlotArea().moveGridBefore(layer)
Call c.setColors(cd.whiteOnBlackPalette) ' Output the chart
Set viewer.Picture = c.makePicture()
====================================
how to make the background images is infrontof the contour chart? that the contour like transfarant?
regard
akim |
Re: images background in contour chart |
Posted by Peter Kwan on Sep-30-2009 01:43 |
|
Hi akim,
To put an image in front of the contour layer, please use:
Call c.addText(c.getPlotArea().getLeftX() + c.getPlotArea().getWidth() / 2, c.getPlotArea().getTopY() + c.getPlotArea().getHeight() / 2, "<*img=Resize of world_map_gif.gif*>", "normal", 8, &H000000, cd.Center)
Hope this can help.
Regards
Peter Kwan |
Re: images background in contour chart |
Posted by akim on Sep-30-2009 11:08 |
|
hi peter..
but the contour cart is "NOT SEE",
i want the contourchart with the imagesbackgroud
like images this...
akim
|
Re: images background in contour chart |
Posted by Peter Kwan on Sep-30-2009 22:45 |
|
Hi akim,
Is your image transparent? You need to use a transparent image that contains only the black outline. If your image is transparent, you should be able to see the contour chart.
If the above still cannot solve the problem, would you mind to attach your image, or email it to me at pkwan@advsofteng.net? I will verify if the image is transparent and try to reproduce the problem.
Regards
Peter Kwan |
Re: images background in contour chart |
Posted by akim on Oct-01-2009 16:24 |
|
thank you verymuch.the problem has been solved
akim |
Re: images background in contour chart |
Posted by jinyan on Sep-04-2013 06:59 |
|
I am using perl to plot contour chart on a smith image. May I know how to change
&H000000 in your code to perl ?
Thanks,
Jinyan |
Re: images background in contour chart |
Posted by Peter Kwan on Sep-04-2013 15:29 |
|
Hi jinyan,
The "&H" in VBA/VB6/VBScript means the number is a hexadecimal number. In Perl, the syntax is "0x", so &H000000 would become 0x000000.
The entire line:
Call c.addText(c.getPlotArea().getLeftX() + c.getPlotArea().getWidth() / 2, c.getPlotArea().getTopY() + c.getPlotArea().getHeight() / 2, "<*img=Resize of world_map_gif.gif*>", "normal", 8, &H000000, cd.Center)
will be:
$c->addText($c->getPlotArea()->getLeftX() + $c->getPlotArea()->getWidth() / 2, $c->getPlotArea()->getTopY() + $c->getPlotArea()->getHeight() / 2, "<*img=Resize of world_map_gif.gif*>", "normal", 8, 0x000000, $perlchartdir::Center);
Hope this can help.
Regards
Peter Kwan |
|