Page 1 of 1
Drawing a specific bandline on an IsoSurface plot
Posted: Mon Jun 13, 2022 8:32 am
by 16463038
How to make an isosurface plot where all contour lines are disabled except one?
For example Series1.BandPen.Visible:=False for all levels except for the level Y=10
Re: Drawing a specific bandline on an IsoSurface plot
Posted: Thu Jun 16, 2022 9:38 am
by yeray
Hello,
I'm afraid there's no property to do this.
However, you can do a trick. You can draw the series twice.
- First, draw the series without
BandPen
the first time, and prepare a special palette with a single
Level
.
- Secondly, draw the series without
Brush
and with a custom
Palette
which has a single
Level
with the desired
UpToValue
.
Ie:
Code: Select all
type TIsoSurfaceAccess=class(TIsoSurfaceSeries);
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Legend.Hide;
Chart1.Aspect.Orthogonal:=False;
Chart1.Aspect.Zoom:=70;
Chart1.Chart3DPercent:=100;
with TIsoSurfaceSeries(Chart1.AddSeries(TIsoSurfaceSeries)) do
begin
FillSampleValues;
BeforeDrawValues:=Series1BeforeDrawValues;
end;
end;
procedure TForm1.Series1BeforeDrawValues(Sender: TObject);
var t: Integer;
begin
with TIsoSurfaceAccess(Chart1[0]) do
begin
// Restore the series to draw the cells with the Brush but without the BandPen
Brush.Style:=bsSolid;
CreateDefaultPalette;
BandPen.Visible:=False;
DrawAllValues;
// Prepare the series to draw the BandPen with the modified palette, without the Brush
BandPen.Visible:=True;
Brush.Style:=bsClear;
CreateDefaultPalette(1);
Palette[0].UpToValue:=0.2;
end;
end;
- Project1_2022-06-16_11-33-34.png (36.32 KiB) Viewed 4571 times