Skip to content

Commit add61f6

Browse files
authored
Merge pull request #738 from mimiframework/plots
Remove plot_comp_graph
2 parents 6ede5fd + b79dcdb commit add61f6

File tree

11 files changed

+3
-175
lines changed

11 files changed

+3
-175
lines changed

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ version = "1.0.1-DEV"
55
[deps]
66
CSVFiles = "5d742f6a-9f54-50ce-8119-2520741973ca"
77
Classes = "1a9c1350-211b-5766-99cd-4544d885a0d1"
8-
Compose = "a81c6b42-2e10-5240-aca2-a61377ecd94b"
98
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
109
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
1110
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -38,7 +37,6 @@ VegaLite = "112f6efa-9a02-5b7d-90c0-432ed331239a"
3837
[compat]
3938
CSVFiles = "0.16, 1.0"
4039
Classes = "1.2"
41-
Compose = "0.7, 0.8, 0.9"
4240
DataFrames = "0.19.1, 0.20, 0.21"
4341
DataStructures = "0.17"
4442
Distributions = "0.21, 0.22, 0.23"
-75 KB
Binary file not shown.

docs/src/howto/howto_2.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,9 @@ getdataframe(m, :Component1=>:Var1, :Component2=>:Var2) # request variables from
2626

2727
## Plotting and the Explorer UI
2828

29-
Mimi provides support for plotting using [VegaLite](https://github.com/vega/vega-lite) and [VegaLite.jl](https://github.com/fredo-dedup/VegaLite.jl) within the Mimi Explorer UI and `Mimi.plot` function, and the [LightGraphs](https://github.com/JuliaGraphs/LightGraphs.jl) and [MetaGraphs](https://github.com/JuliaGraphs/MetaGraphs.jl) for the `plot_comp_graph` function described below.
29+
Mimi provides support for plotting using [VegaLite](https://github.com/vega/vega-lite) and [VegaLite.jl](https://github.com/fredo-dedup/VegaLite.jl).
3030

31-
In order to view a DAG representing the component ordering and relationships, use the `plot_comp_graph` function to view a plot and optionally save it to a file.
32-
33-
```julia
34-
run(m)
35-
plot_comp_graph(m; filename = "MyFilePath.png")
36-
```
37-
![Plot Component Graph Example](../figs/plot_comp_graph_example.png)
38-
39-
Other plotting support is provided by the **Explorer UI**, rooted in `VegaLite`. The `explore` function allows the user to view and explore the variables and parameters of a model run. The explorer can be used in two primary ways.
31+
Plotting support is provided by the **Explorer UI**, rooted in `VegaLite`. The `explore` function allows the user to view and explore the variables and parameters of a model run. The explorer can be used in two primary ways.
4032

4133
In order to invoke the explorer UI and explore all of the variables and parameters in a model, simply call the function `explore` with the model run as the required argument, and a window title as an optional keyword argument, as shown below. This will produce a new browser window containing a selectable list of parameters and variables, organized by component, each of which produces a graphic. The exception here being that if the parameter or variable is a single scalar value, the value will appear alongside the name in the left-hand list.
4234

docs/src/ref/ref_API.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ is_last
2222
modeldef
2323
parameter_names
2424
parameter_dimensions
25-
plot_comp_graph
2625
replace!
2726
set_dimension!
2827
set_leftover_params!

docs/src/tutorials/tutorial_2.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ getdataframe(m, :socioeconomic=>:income)[1:16,:] # results for all regions in fi
120120

121121
After running the FUND model, you may also explore the results using plots and graphs.
122122

123-
Mimi provides support for plotting using [VegaLite](https://github.com/vega/vega-lite) and [VegaLite.jl](https://github.com/fredo-dedup/VegaLite.jl) within the Mimi Explorer UI, and the [LightGraphs](https://github.com/JuliaGraphs/LightGraphs.jl) and [MetaGraphs](https://github.com/JuliaGraphs/MetaGraphs.jl) for the [`plot_comp_graph`](@ref) function.
123+
Mimi provides support for plotting using [VegaLite](https://github.com/vega/vega-lite) and [VegaLite.jl](https://github.com/fredo-dedup/VegaLite.jl) within the Mimi Explorer UI.
124124

125125
#### Explore
126126

@@ -147,15 +147,6 @@ More specifically for our tutorial use of FUND, try:
147147
p = Mimi.plot(m, :socioeconomic, :income)
148148
save("MyFilePath.svg", p)
149149
```
150-
151-
#### Component Graph
152-
153-
In order to view a DAG representing the component ordering and relationships, use the [`plot_comp_graph`](@ref) function to view a plot and optionally save it to a file. This function returns a plot object displayed in the viewer and showing a graph with components as nodes and component connections as edges.
154-
155-
```julia
156-
plot_comp_graph(m, "MyFilePath.png")
157-
```
158-
159150
----
160151

161152
You're done! Now feel free to move on to the next tutorial, which will go into depth on how to **modify** an existing model such as FUND.

src/Mimi.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export
3838
# parameters,
3939
parameter_dimensions,
4040
parameter_names,
41-
plot_comp_graph,
4241
replace_comp!,
4342
set_dimension!,
4443
set_leftover_params!,
@@ -67,7 +66,6 @@ include("core/references.jl")
6766
include("core/time.jl")
6867
include("core/time_arrays.jl")
6968
include("core/model.jl")
70-
include("core/order.jl")
7169
include("core/paths.jl")
7270
include("core/show.jl")
7371

@@ -77,7 +75,6 @@ include("utils/getdataframe.jl")
7775
include("utils/graph.jl")
7876
include("utils/lint_helper.jl")
7977
include("utils/misc.jl")
80-
include("utils/plotting.jl")
8178

8279
# Load built-in components
8380
include("components/adder.jl")

src/core/connections.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,5 @@ function add_connector_comps!(obj::AbstractCompositeComponentDef)
632632
end
633633
end
634634

635-
# Save the sorted component order for processing
636-
# obj.sorted_comps = _topological_sort(obj)
637-
638635
return nothing
639636
end

src/core/order.jl

Lines changed: 0 additions & 64 deletions
This file was deleted.

src/utils/plotting.jl

Lines changed: 0 additions & 36 deletions
This file was deleted.

test/runtests.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ Electron.prep_test_env()
113113
@info("test_explorer_compositecomp.jl")
114114
@time include("test_explorer_compositecomp.jl")
115115

116-
@info("test_plotting.jl")
117-
@time include("test_plotting.jl")
118-
119116
@info("mcs/runtests.jl")
120117
@time include("mcs/runtests.jl")
121118

0 commit comments

Comments
 (0)