Anyone has IAV example with Axis labels working

Anyone has IAV example with Axis labels working

Hello,

I am looking for an example where I can get the labels on axis to show up for IVF active X control. Please see attached picture.

Any help would be greatly appreciated.

The CVF code that does that is given below. What is the equivalent IVF code

sharename = GetShareName()
! Setup the Avis2D properties
ret = AUTOSetProperty(hAvis2D1, "FileName", sharename)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "ShowPalette", .TRUE.)
if (ret /= 0) return

ret = AUTOSetProperty(hAvis2D1, "PaletteAutoAdjust", .FALSE.)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "Paletteminval", minval)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "Palettemaxval", maxval)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "ShowCursor", .FALSE.)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "ZMinClamp",minval)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "ZMaxClamp",maxval)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "ZScale", 0.8)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "XAxisLabel", 'Axial F-E')
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "YAxisLabel", 'Thickness O-I')
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "ZAxisLabel", 'Temperature (C)')
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "Resolution", 5.0)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "AxisAutoScale", .FALSE.)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "AxisAutoDetail", .TRUE.)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "XNumMajorTickmarks", 1)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "YNumMajorTickmarks", 1)
if (ret /= 0) return
ret = AUTOSetProperty(hAvis2D1, "ZNumMajorTickmarks", 5)
if (ret /= 0) return
ret = AUTOSetProperty(hAvisGrid1, "FileName", sharename)
if (ret /= 0) return
ret = AUTOSetProperty(hAvisGrid1, "PRECISION", 2)
if (ret /= 0) return
ret = AUTOSetProperty(hAvisGrid1, "FIELDWIDTH", 6)
if (ret /= 0) return
ret = AUTOSetProperty(hAvisGrid1, "SHOWDIMLABELS", 'Axial Direction')
if (ret /= 0) return

IVF Code that partly works (does not put Chart labels, or axis labels or grid numbers or a rainbow legend)

call CreatePalette(status)

call avSetXYSource(hPlot, "/M", status) ! WORKS!!!

call avSetPaletteDataSource(avColor(hPlot), "/Palette", status)

call avSetFront(avColor(hPlot), avRGBA(255, 255, 255, 255), status)

call avSetColorSource(avColor(hPlot), "/M", status)

call avSetColorSourceFormat(avColor(hPlot), AV_RANGE, status)

call avSetColorSourceFo
rmat(hPlot, AV_RANGE, status)

call avSetOrigin(hTransform, (/0.0_8, 0.0_8, minval/), status)

call avSetSize(hTransform, (/real(m_ncols), real(m_nrows), real(maxval)/), status)

call avSetColorSource(avColor(hPlot), "/M", status)

call avSetColorSourceFormat(avColor(hPlot), AV_RANGE, status)

call avSetPaletteRangeStart(avColor(hPlot), real(minval), status)

call avSetPaletteRangeEnd(avColor(hPlot), real(maxval), status)

call avCreateAxis(avAxes(hGraph), "xaxis", haxis(1))

call avCreateAxis(avAxes(hGraph), "yaxis", haxis(2))

call avCreateAxis(avAxes(hGraph), "zaxis", haxis(3))

! X axis properties

hPosition = avPosition(hAxis(1))

call avSetOrigin(hPosition, (/-0.9_8, -0.75_8, -1.0_8 /), status)

call avSetSize(hPosition, (/2.0_8, 0.0_8, 0.0_8 /), status)

call avSetVertical(hAxis(1), AV_FALSE, status)

call avSetVisible(hAxis(1), AV_TRUE, status)

call avSetFront(avColor(hAxis(1)), avRGBA(255, 0, 0, 255), status)

call avSetCapSize(haxis(1), AV_LINE_START, 1.0_4, status)

call avSetCapSize(haxis(1), AV_LINE_END, 1.0_4, status)

call avSetLineCap(haxis(1), AV_LINE_START, AV_BRACKET_CAP, status)

call avSetLineCap(haxis(1), AV_LINE_END, AV_BRACKET_CAP, status)

call avSetLineWidth(haxis(1), 2.0_4, status)

hMajor = avMajor(haxis(1))

call avSetVisible(hMajor, AV_TRUE, status)

call avSetAscend(hMajor, 0.4_4, status)

call avSetDescend(hMajor, 0.4_4, status)

call avSetColor(avColor(hMajor), avRGBA(0, 150, 150, 255), status)

hMinor = avMinor(haxis(1))

call<
/B> avSetVisible(hMinor, AV_TRUE, status)

call avSetAscend(hMinor, 0.1_4, status)

call avSetDescend(hMinor, 0.4_4, status)

call avSetColor(avColor(hMinor), avRGBA(150, 150, 150, 255), status)

call avSetNumTicks(hMinor, 1, status)

hLabel = avLabel(haxis(1))

call avSetVisible(hLabel, AV_TRUE, status)

call avSetColor(avColor(hLabel), avRGBA(0, 0, 0, 255), status)

call avSetFontSize(hLabel, 1.0_4, status)

call avSetHJustify(hLabel, AV_CENTER_JUSTIFY, status)

call avSetVJustify(hLabel, AV_BASE_JUSTIFY, status)

hScale = avScale(haxis(1))

call avSetIncrement(hScale, 0.5_8, status)

call avSetRangeStart(hScale, -2.0_8, status)

call avSetRangeEnd(hScale, 2.0_8, status)

Thanks Sumit

AnexoTamanho
Download iav_vs_cav.jpg233.34 KB
1 post / novo 0
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.