Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MRIBuilder.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
MRIBuilder.jl
Commits
4d5d7761
Verified
Commit
4d5d7761
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Add plotting function if Makie is installed
parent
d965d5a8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Project.toml
+1
-0
1 addition, 0 deletions
Project.toml
src/plot.jl
+41
-0
41 additions, 0 deletions
src/plot.jl
with
42 additions
and
0 deletions
Project.toml
+
1
−
0
View file @
4d5d7761
...
@@ -8,6 +8,7 @@ Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
...
@@ -8,6 +8,7 @@ Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
JuMP
=
"4076af6c-e467-56ae-b986-b466b2749572"
JuMP
=
"4076af6c-e467-56ae-b986-b466b2749572"
Juniper
=
"2ddba703-00a4-53a7-87a5-e8b9971dde84"
Juniper
=
"2ddba703-00a4-53a7-87a5-e8b9971dde84"
LinearAlgebra
=
"37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearAlgebra
=
"37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MakieCore
=
"20f20a25-4f0e-4fdf-b5d1-57303727442b"
Polynomials
=
"f27b6e38-b328-58d1-80ce-0feddd5e7a45"
Polynomials
=
"f27b6e38-b328-58d1-80ce-0feddd5e7a45"
Printf
=
"de0858da-6303-5e67-8744-51eddeeeb8d7"
Printf
=
"de0858da-6303-5e67-8744-51eddeeeb8d7"
QuadGK
=
"1fd47b50-473d-5c70-9696-f719f8f3bcdc"
QuadGK
=
"1fd47b50-473d-5c70-9696-f719f8f3bcdc"
...
...
This diff is collapsed.
Click to expand it.
src/plot.jl
+
41
−
0
View file @
4d5d7761
...
@@ -130,4 +130,45 @@ function SequenceDiagram(seq::BaseSequence)
...
@@ -130,4 +130,45 @@ function SequenceDiagram(seq::BaseSequence)
for
symbol
in
[
:
RFx
,
:
RFy
,
:
G
,
:
Gx
,
:
Gy
,
:
Gz
,
:
ADC
]]
...
)
for
symbol
in
[
:
RFx
,
:
RFy
,
:
G
,
:
Gx
,
:
Gy
,
:
Gz
,
:
ADC
]]
...
)
end
end
"""
plot(sequence; kwargs...)
plot!([scene,] sequence; kwargs...)
plot_sequence(sequence; kwargs...)
plot_sequence!([scene,] sequence; kwargs...)
Plot the sequence diagram.
This function will only work if [`Makie`](https://makie.org) is installed and imported.
## Attributes
### Line properties
- `linecolor` sets the color of the lines. If you want to set the text color to the same value, you can also use `color=...`.
- `linewidth=1.5` sets the width of the lines.
- `instant_width=3.` sets the width of any instant gradients or pulses with respect to the `linewidth`.
### Text properties
- `textcolor` sets the color of the text. If you want to set the line color to the same value, you can also use `color=...`.
- `font` sets whether the rendered text is :regular, :bold, or :italic.
- `fontsize`: set the size of each character.
$
(Base.Docs.doc(generic_plot_attributes!))
"""
@recipe
(
Plot_Sequence
,
sequence
)
do
scene
attr
=
Attributes
(
color
=
theme
(
scene
,
:
textcolor
),
linecolor
=
automatic
,
linewidth
=
1.5
,
instant_width
=
3.
,
textcolor
=
automatic
,
font
=
theme
(
scene
,
:
font
),
fonts
=
theme
(
scene
,
:
fonts
),
fontsize
=
theme
(
scene
,
:
fontsize
),
fxaa
=
true
,
)
generic_plot_attributes!
(
attr
)
return
attr
end
end
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment