Page 1 of 1

Contour in polar plots

Posted: Tue May 20, 2008 10:39 am
by 9637394
Hi

I am new to this an have an application where we have to make contours in a polar plot.

Is it possible?

We are using v. 2_0_2306_26232

Best regards

Jan Madsen

Posted: Tue May 20, 2008 1:50 pm
by narcis
Hi Jan,

Sorry but I don't understand what are you trying to do exactly. Could you please give us some more details? An example image would help. You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

BTW: There's a newer version of TeeChart for .NET v2 available at the client area.

Posted: Wed May 21, 2008 7:32 am
by 9637394
narcis wrote:
Sorry but I don't understand what are you trying to do exactly. Could you please give us some more details? An example image would help. You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
I have uploaded an example of a plot we have made with Mathlab. It is actually a Smithchart with contours on it.

So if it can make contours on a Smith chart it should do the trick.

The filename is 'Contourplot.jpg'


Best regards

Jan Madsen

Posted: Wed May 21, 2008 8:12 am
by narcis
Hi Jan,

Thanks for the information.

Yes, you should be able to do what you request using Polar series as shown in the All Features\Welcome !\Chart styles\Extended\Polar\ClockWise labels example in the features demo, available at TeeChart's program group.

You can hide series pointers like this:

Code: Select all

polar1.Pointer.Visible=false;
You'll need one polar series for each contour level.

Hope this helps!

Posted: Thu May 22, 2008 6:25 am
by 9637394
Hi

Thanks for the reply.
narcis wrote:
You'll need one polar series for each contour level.
So it actually means I have to do the calculation for the contours myselves.

I guess I can do the same in a Smith chart if I wanted to add contours to that plot?

Another question, it is possible to make solid color in the area of the contours.

Best regards

Jan Madsen

Posted: Thu May 22, 2008 9:05 am
by narcis
Hi Jan,
So it actually means I have to do the calculation for the contours myselves.
Yes, those series styles are not designed ot plot contour charts.
I guess I can do the same in a Smith chart if I wanted to add contours to that plot?
Yes, I think it would be very similar to using Polar series.
Another question, it is possible to make solid color in the area of the contours.


You can try using this:

Code: Select all

			polar1.Brush.Visible = true;
Also, if you want to draw a Contour series in a circular region you can use canvas clipping like this:

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			tChart1.Aspect.View3D = false;

			Steema.TeeChart.Styles.Contour contour1 = new Steema.TeeChart.Styles.Contour(tChart1.Chart);
			contour1.FillSampleValues();

			Bitmap bmp = tChart1.Bitmap;
			tChart1.AfterDraw += new PaintChartEventHandler(tChart1_AfterDraw);
			tChart1.BeforeDraw += new PaintChartEventHandler(tChart1_BeforeDraw);
		}

		void tChart1_BeforeDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			g.ClipEllipse(new Rectangle(100, 100, 200, 200));
		}

		void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			g.UnClip();
		}