Skip to content

Commit 6e8298e

Browse files
Documentation for polar plot (#210)
Co-authored-by: JennaPaikowsky <[email protected]>
1 parent f1941cc commit 6e8298e

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

doc/source/_static/polar_plot.png

47.8 KB
Loading

doc/source/examples_source/00-basic/02-plottype.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,53 @@
293293
#
294294
# .. image:: /_static/3d_scatter.png
295295
#
296+
# Visualize a polar plot
297+
# --------------------------
298+
#
299+
# A polar plot is a plot type that visualizes the data point in a polar
300+
# coordinate system. One common variation of a polar plot is a radar chart. The
301+
# data position is determined by:
302+
303+
###############################################################################
304+
# * Radius (r): The distance from the center of the polar plot, defined by
305+
# the **yaxis** property.
306+
# * Theta (θ): The direction of the point, measured in numeric degrees or
307+
# categorical data, defined by the **xaxis** property.
308+
309+
###############################################################################
310+
# .. note::
311+
# * **Scatter polar** is the only available polar plot type for now.
312+
# * The **theta (θ)** value is defined by the data type of the **xaxis**
313+
# values:
314+
#
315+
# * If xaxis values have minus numeric value: The labels will be a list
316+
# of symmetrical values from "**(-180°) - (180°)**".
317+
# * If xaxis values are all positive values: The labeles will be from
318+
# "**(0°) - (360°)**".
319+
# * If xaxis values are categorical values: All xaxis values will be used
320+
# to label.
321+
322+
polar = adr_service.create_item()
323+
# We can use the same data as we use to visualize heatmap
324+
polar.item_table = np.array(
325+
[
326+
["-180", "-135", "-90", "-45", "0", "45", "90", "135", "180"],
327+
[8.2, 7.3, 10.6, 5.6, 5.9, 9.1, 2.4, 1.6, 4.8],
328+
],
329+
dtype="|S20",
330+
)
331+
polar.plot = "polar plot"
332+
polar.format = "floatdot0"
333+
polar.xaxis = 0
334+
polar.format_row = "str"
335+
polar.labels_row = ["theta", "r"]
336+
polar.visualize()
337+
338+
339+
###############################################################################
340+
#
341+
# .. image:: /_static/polar_plot.png
342+
#
296343
# Close the service
297344
# -----------------
298345
#

0 commit comments

Comments
 (0)