Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Is it possible to draw an arc on an Antenna Plot?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]


T O P I C    R E V I E W
waveslam Posted - 24 Sep 2017 : 18:19:33
I am using Antenna Plots in my application, and I have a need to highlight a subset of the plot with an arc i.e. a curved line that starts at (say) 30 degrees and continues at a fixed magnitude until it ends at (say) 90 degrees. Essentially I need something like this (https://www.quinn-curtis.com/qxy/topic.asp?TOPIC_ID=823) except that:
1. I am using Antenna Plot not Polar Plot, and
2. I actually want a curved line, not a straight line as per the example screenshot in that post

I have tried adding a simple AntennaLinePlot based on a dataset of 2 points (i.e. the starting and ending coords of the arc I want) but when drawn it appears that additional lines are added to join the ends of my arc back up to the 0 degree point on the plot.

Is what i am trying to do possible please?
Thanks in advance
4   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 26 Sep 2017 : 12:03:07
That sounds right.
waveslam Posted - 25 Sep 2017 : 16:54:41
Thank you for the quick and detailed reply - much appreciated! The good news is that your sample code worked exactly as expected and drew the arc. By comparing this to my code I was quickly able to identify my problem which was due to the ChartAttribute I was using to draw the arc. In your example (which works) you used:

ChartAttribute attrib11 = new ChartAttribute(Color.Blue, 1, DashStyle.Solid);

Whereas in my code, i was defining this ChartAttribute to also have a fill colour (although it was set to Transparent):

ChartAttribute attrib11 = new ChartAttribute(Color.Blue, 1, DashStyle.Solid, Color.Transparent);

This additional fill colour parameter was what was causing the extraneous lines to be drawn, presumably just because the code needed a closed polygon in order to fill it. Anyway, removing that attribute solved my problem so huge thanks !!!


quinncurtis Posted - 25 Sep 2017 : 11:20:10
If you can get it to work in our example, it should work in your program too.

The first thing you should look at is whether your source data arrays have a size of 2. Because if they are larger, and you are just using the first two elements, it may be that the software is using the unused values of set to 0 by default, and these are causing the extraneous lines to be drawn.

Otherwise it sounds like the data in the arrays is not what you expect it to be.

You can add a simple line segment to your program with hardcoded data values, within the range of your charts magnitude scale. It would be completely independent of the other stuff you are doing in the chart.

double[] mag1 = new double[2];
double[] ang1 = new double[2];

mag1[0] = 20;
mag1[1] = 30;
ang1[0] = 40;
ang1[1] = 90;

Dataset11 = new SimpleDataset("First", mag1, ang1);
ChartAttribute attrib11 = new ChartAttribute(Color.Blue, 1, DashStyle.Solid);

AntennaLineMarkerPlot thePlot11 = new AntennaLineMarkerPlot(pAntennaTransform, Dataset11, attrib11);

Does it exhibit the behavior you describe, or does it just plot the one, curved line segment, from 40 to 90 degrees?
waveslam Posted - 24 Sep 2017 : 19:23:53
Further to my own post, I have found that what I want seems possible as I was able to modify the AntennaCharts.AntennaLineMarkerChart example program to achieve what I want using exactly the technique i described earlier i.e. creating a dataset with just 2 points (starting and ending point of the arc) and adding it to the chart. However, I am unable to replicate this in my own application - the arc i want is drawn but has additional line segments added to join the 0 deg position with the start of my arc, and then another joining the end of my arc to the 0 position again.
I am struggling to identify the cause of the different behaviour though, as i create my dataset and add the AntennaLinePlot in my code just as it is done in the example - could it be due to scaling of my antenna axes or something? I am at a loss...
Thanks in advance

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07