Skip to content

Commit 64714ef

Browse files
committed
Initial commit.
0 parents  commit 64714ef

File tree

7 files changed

+541
-0
lines changed

7 files changed

+541
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*~
2+
*.asv

Examples.mlx

63 KB
Binary file not shown.

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Thermometer Chart
2+
3+
Version: 1.0
4+
5+
Create a thermometer style chart with a stem, bulb, and desired labels, e.g. thermometer plots which are used in reaching fundraising or donation goals. The main body of the thermometer chart displays a circle-shaped bulb connected to a long vertical stem, which are filled in with sectioned-off colors representing quantitative progress according to different categories.
6+
7+
![Example thermometerChart](./exampleTC.png)
8+
9+
## Syntax
10+
* `thermometerChart(AreaData, Max)` creates a thermometer plot with maximum value specified. AreaData is a vector of 1D data displayed on the thermometer chart. Each quantitity is displayed above the last on the vertical stem, so the final chart is cumulative.
11+
* `thermometerChart(AreaData, Limits)` has similar functionality as `thermometerChart(AreaData, Max)` but specifies minimum, maximum values as a 1 x 2 numerical vector called Limits.
12+
* `thermometerChart(___, Name, Value)` specifies additional options for the multi-color line plot using one or more name-value pair arguments. Specify the options after all other input arguments.
13+
* `thermometerChart(ax, ___)` creates the thermometer chart in the parent `ax`.
14+
* `h = thermometerChart(___)` returns the thermometerChart object. Use h to modify properties of the plot after creation.
15+
16+
## Name-Value Pair Arguments/Properties
17+
* `AreaData` (1 x n numeric vector) numeric vector where each entry can correspond to a different category. Values in the vector must be positive.
18+
* `AreaLabels` (1 x n string array or cellstr) string array or cellstr which contains the categorical labels corresponding to elements in AreaData. These labels are added to the right of the thermometer stem, rotated to be vertical.
19+
* `GoalData` (1 x m numeric vector) numeric vector of goal values which are marked with tick marks and goal labels along the stem of the thermometer.
20+
* `GoalLabels` (1 x m string array of cellstr) string array or cellstr which contains the labels corresponding to each element in GoalData. For each GoalData element, the corresponding text label is added to one side of the thermometer stem at the goal value. By default these are located on the left side of the thermometer stem.
21+
* `GoalLocation` (string) A string (`'left'` or `'right'`) describing whether or not GoalLabels, if specified, should be placed to the left or right of the thermometer stem.
22+
For a thermometer chart with many AreaLabels on the right, it may be preferred to have GoalLabels located to the left (default setting). For a thermometer chart with no AreaLabels on the right, GoalsLocation may be set to `'right'` such that the goal labels are on the right.
23+
* `Limits` (1 x 2 numeric vector) minimum and maximum value shown on vertical axis along the thermometer stem. If the second argument to thermometerChart is a scalar, it is used as the maximum value and the minimum value is set to 0.
24+
* `TitleText` (n x 1 string vector) title of the plot.
25+
26+
## Example
27+
Create a thermometer chart for a fundraiser according to ticket sales, concessions, and donations. Specify first and second goals for the chart.
28+
29+
```
30+
areaLabels = ["Tickets", "Concessions", "Donations"];
31+
goalData = [10, 18];
32+
goalLabels = ["First Goal", "Second Goal"];
33+
th = thermometerChart([5, 4, 7], 20, "AreaLabels", areaLabels, "GoalData", goalData, ...
34+
"GoalLabels", goalLabels);
35+
th.TitleText = "Fundraiser Thermometer Chart (Hundreds)";
36+
```

SECURITY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reporting Security Vulnerabilities
2+
3+
If you believe you have discovered a security vulnerability, please report it to
4+
[[email protected]](mailto:[email protected]). Please see
5+
[MathWorks Vulnerability Disclosure Policy for Security Researchers](https://www.mathworks.com/company/aboutus/policies_statements/vulnerability-disclosure-policy.html)
6+
for additional information.

exampleTC.png

17.4 KB
Loading

license.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2021, The MathWorks, Inc.
2+
All rights reserved.
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
5+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
6+
3. In all cases, the software is, and all modifications and derivatives of the software shall be, licensed to you solely for use in conjunction with MathWorks products and service offerings.
7+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)