You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pareto Charts are a type of chart that uses both $y$ axes. The $y_1$ axis is used to represent bars with the data values in descending order. The $y_2$ axis is used to represent the cumulative distribution function of the data in the $y_1$ axis. By default, a Pareto Chart includes up to 10 items or as many items as needed to represent 95% of the cumulative distribution.
496
+
Pareto Charts are a type of chart that uses both <img src="https://render.githubusercontent.com/render/math?math=y"> axes. The <img src="https://render.githubusercontent.com/render/math?math=y_1"> axis is used to represent bars with the data values in descending order. The <img src="https://render.githubusercontent.com/render/math?math=y_2"> axis is used to represent the cumulative distribution function of the data in the <img src="https://render.githubusercontent.com/render/math?math=y_1"> axis. By default, a Pareto Chart includes up to 10 items or as many items as needed to represent 95% of the cumulative distribution.
497
497
498
498
If you need Pareto *fronts* rather than Pareto *charts*, we refer to [Scatter Plots](#scatter-plot) for two-dimensional fronts, [Plot matrices](#plot-matrix) for three-dimensional fronts, or [Parallel Coordinate Plots](#parallel-coordinates) for many-objective fronts. These plot subcategories are described in Section [Data Distribution](#data-distribution). If you also need a tool to calculate these fronts efficiently, we refer to the [Pareto Front Library](https://github.com/alandefreitas/pareto-front).
499
499
@@ -551,15 +551,15 @@ More examples:
551
551
552
552
For the first geography plot, **Matplot++** calls `geoplot()`, which creates a filled polygon with the world map. This first plot receives the tag `"map"` so that subsequent geography plots recognize there is no need to recreate this world map.
553
553
554
-
The data for the world map comes from Natural Earth. They provide data at 1:10m, 1:50m, and 1:110m scales. The `geoplot` function will initially use the data at the 1:110m scales. The `geolimits` function can be used to update the axis limits for geography plots. The difference between the usual functions for adjusting axis limits (`xlim` and `ylim`) and `geolimits` is that the latter will also update the map resolution according to the new limits for the $x$ and $y$ axis.
554
+
The data for the world map comes from Natural Earth. They provide data at 1:10m, 1:50m, and 1:110m scales. The `geoplot` function will initially use the data at the 1:110m scales. The `geolimits` function can be used to update the axis limits for geography plots. The difference between the usual functions for adjusting axis limits (`xlim` and `ylim`) and `geolimits` is that the latter will also update the map resolution according to the new limits for the <imgsrc="https://render.githubusercontent.com/render/math?math=x"> and <imgsrc="https://render.githubusercontent.com/render/math?math=y"> axis.
555
555
556
556
The `geolimits` function will query the `figure` size and, depending on the new limits for the axes, update the map to the 1:10m, or 1:50m scales if needed. Because it would be very inefficient to render the whole world map at a 1:10m or 1:50m scale only to display a region of this map, the `geolimits` function also crops the data pertinent to the new region being displayed.
557
557
558
558
Note that this does not only involve removing data points outside the new limits but it also needs to create new data points on the correct borders to create new polygons coherent with the map entry points in the region. For this reason, the algorithm needs to track all submaps represented as closed polygons in the original world map. If submaps are completely inside or outside the new ranges, we can respectively include or dismiss the data points. However, if the submap is only partially inside the new limits, to generate the correct borders for the polygons, we need to track all points outside the limits to classify the directions of these points outside the limits. We do that by only including points that change quadrants around the new limits so that the map entry points create polygons that look like they would if the complete world map were still being rendered outside these new limits.
559
559
560
560
If the you are not interested in geographic plots, the build script includes an option to remove the high-resolution maps at 1:10m and 1:50m scales from the library. In this case, the library will always use the map at a 1:110m scale no matter the axis limits.
561
561
562
-
The function `world_cities` returns a list of major world cities. Its parameters define the minimum distances between cities in the $x$ and $y$ axes. The `greedy_tsp` function is a naive greedy algorithm to find a route between these cities as a Traveling Salesman Problem (TSP). We use the `geoplot` function to draw this route. Note that we use method chaining to define some further plot properties. Finally, the `text` function includes the city names in the map.
562
+
The function `world_cities` returns a list of major world cities. Its parameters define the minimum distances between cities in the <imgsrc="https://render.githubusercontent.com/render/math?math=x"> and <imgsrc="https://render.githubusercontent.com/render/math?math=y"> axes. The `greedy_tsp` function is a naive greedy algorithm to find a route between these cities as a Traveling Salesman Problem (TSP). We use the `geoplot` function to draw this route. Note that we use method chaining to define some further plot properties. Finally, the `text` function includes the city names in the map.
By emplacing a polar plot in the `axes`, the `axes` move to a polar mode, where we use the $r$ and $t$ axis instead of the $x$ and $y$ axis.
628
+
By emplacing a polar plot in the `axes`, the `axes` move to a polar mode, where we use the <imgsrc="https://render.githubusercontent.com/render/math?math=r"> and <imgsrc="https://render.githubusercontent.com/render/math?math=t"> axis instead of the <imgsrc="https://render.githubusercontent.com/render/math?math=x"> and <imgsrc="https://render.githubusercontent.com/render/math?math=y"> axis.
629
629
630
-
From the backend point of view, these axes are an abstraction to the user. The data points in the $r$ and $t$ axis are drawn by converting the positions from the polar coordinates $r$ and $t$ to the Cartesian coordinates $x$ and $y$ with the relationships $x=r\cos{t}$ and $y=r\sin{t}$.
630
+
From the backend point of view, these axes are an abstraction to the user. The data points in the <imgsrc="https://render.githubusercontent.com/render/math?math=r"> and <imgsrc="https://render.githubusercontent.com/render/math?math=t"> axis are drawn by converting the positions from the polar coordinates <imgsrc="https://render.githubusercontent.com/render/math?math=r"> and <imgsrc="https://render.githubusercontent.com/render/math?math=t"> to the Cartesian coordinates <imgsrc="https://render.githubusercontent.com/render/math?math=x"> and <imgsrc="https://render.githubusercontent.com/render/math?math=y"> with the relationships <imgsrc="https://render.githubusercontent.com/render/math?math=x=r\cos{t}"> and <imgsrc="https://render.githubusercontent.com/render/math?math=y=r\sin{t}">.
631
631
632
632
Aside from this conversion, these plot subcategories are analogous to line plots, scatter plots, histograms, quiver plots, and line functions.
633
633
@@ -719,13 +719,13 @@ More examples:
719
719
720
720
All these subcategories depend on the `contours` type. They also depend on lazy evaluation for generating the contour lines. When the function `draw` is called in the `contours` class, it preprocesses all contour lines for a three-dimensional function.
721
721
722
-
Although it is relatively simple to show a heatmap with the values for the $z$-axis, calculating contour lines relative to the $z$-axis is more complex than it might seem at first. We provide the function `contourc` for calculating contour lines. This function uses an adaptation of the algorithm adopted by Matplotlib.
722
+
Although it is relatively simple to show a heatmap with the values for the <img src="https://render.githubusercontent.com/render/math?math=z">-axis, calculating contour lines relative to the <img src="https://render.githubusercontent.com/render/math?math=yz">-axis is more complex than it might seem at first. We provide the function `contourc` for calculating contour lines. This function uses an adaptation of the algorithm adopted by Matplotlib.
723
723
724
-
The algorithm creates a quad grid defined by the $x$ and $y$ values. It uses this grid to infer a contour line passing through positions with the same $z$ value. The algorithm sweeps through the grid twice to generate these lines. The first sweep looks for lines that start on the boundaries. The second sweep looks for interior closed loops.
724
+
The algorithm creates a quad grid defined by the <img src="https://render.githubusercontent.com/render/math?math=x"> and <img src="https://render.githubusercontent.com/render/math?math=y"> values. It uses this grid to infer a contour line passing through positions with the same <img src="https://render.githubusercontent.com/render/math?math=z"> value. The algorithm sweeps through the grid twice to generate these lines. The first sweep looks for lines that start on the boundaries. The second sweep looks for interior closed loops.
725
725
726
726
Filled contours are closed polygons for pairs of contour levels. Some polygons for filled contours might be holes inside other polygons. The algorithm needs to keep track of these relationships so that we can render the polygons in their accurate order. To avoid an extra step that identifies this relationship between the polygons, the sweeping algorithm already identifies which polygons are holes for each level.
727
727
728
-
Once we find the quads with the contour line, the line is generated by interpolating the $z$ values around that quad.
728
+
Once we find the quads with the contour line, the line is generated by interpolating the <img src="https://render.githubusercontent.com/render/math?math=z"> values around that quad.
By default, the function `fcontour` will generate 9 contour lines from a lambda function. The functions `contour` and `contourf`, on the other hand, plot contour lines and filled contour lines from a grid of data points for $x$, $y$, and $z$.
762
+
By default, the function `fcontour` will generate 9 contour lines from a lambda function. The functions `contour` and `contourf`, on the other hand, plot contour lines and filled contour lines from a grid of data points for <img src="https://render.githubusercontent.com/render/math?math=x">, <img src="https://render.githubusercontent.com/render/math?math=y">, and <img src="https://render.githubusercontent.com/render/math?math=z">.
All these subcategories depend on the `vectors` object type. In a two-dimensional plot, for each value of $x$ and $y$ with the position of a vector, it also requires the value of $u$ and $v$ indicating its direction and magnitude. In a three-dimensional plot, the direction and magnitude are defined by $u$, $v$, and $w$.
784
+
All these subcategories depend on the `vectors` object type. In a two-dimensional plot, for each value of <imgsrc="https://render.githubusercontent.com/render/math?math=x"> and <imgsrc="https://render.githubusercontent.com/render/math?math=y"> with the position of a vector, it also requires the value of <imgsrc="https://render.githubusercontent.com/render/math?math=u"> and <imgsrc="https://render.githubusercontent.com/render/math?math=v"> indicating its direction and magnitude. In a three-dimensional plot, the direction and magnitude are defined by <imgsrc="https://render.githubusercontent.com/render/math?math=u">, <imgsrc="https://render.githubusercontent.com/render/math?math=v">, and <imgsrc="https://render.githubusercontent.com/render/math?math=w">.
785
785
786
786
787
787
A quiver plot (or velocity plot) shows a grid of vectors whose direction and magnitude are scaled to prevent the overlap between vectors in subsequent quads.
The rectangle object can have a border curvature from $0$ to $1$. We can also annotate with text, arrows, polygons, and lines.
1131
+
The rectangle object can have a border curvature from <imgsrc="https://render.githubusercontent.com/render/math?math=0"> to <imgsrc="https://render.githubusercontent.com/render/math?math=1">. We can also annotate with text, arrows, polygons, and lines.
0 commit comments