Skip to content

Commit

Permalink
Adding "OptionNames" in SyntaxInformation of WolframModelPlot. (#454)
Browse files Browse the repository at this point in the history
## Changes
* Closes #218.
* Adding "OptionNames" in `SyntaxInformation` of `WolframModelPlot`.

## Examples
```wl
In[] := WolframModelPlot[{{1, 2, 3}}, "InvalidOption" -> 4]
```
![image](https://user-images.githubusercontent.com/40190339/95776857-c0869e00-0c8a-11eb-93e7-74b8df0853b0.png)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/maxitg/setreplace/454)
<!-- Reviewable:end -->
  • Loading branch information
daneelsan authored Oct 12, 2020
1 parent 3ee41bd commit 2278ed1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Kernel/WolframModelPlot.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
WolframModelPlot::usage = usageString[
"WolframModelPlot[`s`, `opts`] plots a list of vertex lists `s` as a hypergraph."];

SyntaxInformation[WolframModelPlot] = {"ArgumentsPattern" -> {_, _., OptionsPattern[]}};

$plotStyleAutomatic = <|
$vertexPoint -> style[$lightTheme][$vertexStyle],
$edgeLine -> style[$lightTheme][$edgeLineStyle],
Expand Down Expand Up @@ -41,6 +39,10 @@

Options[WolframModelPlot] = Join[$newOptions, $defaultGraphicsOptions];

SyntaxInformation[WolframModelPlot] = {
"ArgumentsPattern" -> {_, _., OptionsPattern[]},
"OptionNames" -> Options[WolframModelPlot][[All, 1]]};

$edgeTypes = {"Ordered", "Cyclic"};
$defaultEdgeType = "Ordered";
$graphLayout = "SpringElectricalEmbedding";
Expand Down

0 comments on commit 2278ed1

Please sign in to comment.