How does one interactively manipulate polar plot data?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Background
Because the original numerical data of a set of antenna pattern measurements is no longer available, attempts to extract the data from printed polar plots have been made using WebPlotDigitizer. However, as WebPlotDigitzer's results are not identical to the original polar plots, I need to modify the values of the angular and radial components.The result of this process has provided data which can now be visualized and manipulated in MATLAB.
From MATLAB Exchange, I have downloaded and experimented with the only two m-files that might offer the solution sought: "moveplot.m"; and "LineManipulator.m". However, it would appear that neither is capable of working with data displayed in a polar axes.
Challenge
Unfortunately, the image-to-data conversion process was imperfect and it can be seen through visual inspection that some points have been misplaced. To "fix" the plots, I would like to compare the original polar pattern with a figure that shows the imported data (comprised of angular and radial coordinate pairs in degrees and decibels respectively) and then, through the use of the keyboard, manually manipulate the data until it "fits" the polar plot. The left and right cursor keys would be used to decrement and increment the index of the angular component while the up and down cursor keys would be used in increase and decrease the value of the radial component. The space bar would be used to "commit" the change to the vector.
Graphical examples
The figure shows two polar plots: on the left is the original (the trace of interest is shown in red); and on the right is the result of the graphical import (in which, amongst other things, the two main lobes show unwanted artefacts).

Attempt
In the following example, I have created a perfect polar pattern and added datacursors as a first attempt to develop the functionality described in the challenge above.
r_min=-45;
theta_deg = 1:360;
rad_dB = 10*log10(cos(deg2rad(theta_deg)).^2);
rad_dB(rad_dB<r_min) = r_min;
f1 = figure(1);
h1 = polarplot(deg2rad(theta_deg), rad_dB, 'r-.');
rlim([-35 0])
ax = gca;
d = ax.ThetaDir;
ax.ThetaDir = 'clockwise';
d = ax.ThetaZeroLocation;
ax.ThetaZeroLocation = 'top';
hdt = datacursormode;
set(hdt,'DisplayStyle','window');
% Declare a custom datatip update function
% to display state names:
set(hdt,'UpdateFcn',{@labeldtips,hwydata,statelabel})
In order to close the challenge, I am asking for help to develop code that will implement the functionality described above.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Polar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!