Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display diagram vertically? #5

Closed
seanhardison1 opened this issue Jul 29, 2019 · 2 comments
Closed

Display diagram vertically? #5

seanhardison1 opened this issue Jul 29, 2019 · 2 comments

Comments

@seanhardison1
Copy link

@seanhardison1 seanhardison1 commented Jul 29, 2019

Hi Javier,

Thanks for the great uml interface. How can I make a diagram display vertically (rather than horizontally as in your "[Hello]-[world]" example) from rmarkdown?

Here's my example:

---
output:
  github_document:
    fig_width: 4
    fig_height: 1
always_allow_html: yes
---

```{r setup, include = FALSE}
library(nomnoml)
knitr::opts_chunk$set(eval = TRUE, echo = F, warning = F)
knitr::opts_chunk$set(fig.path = "tools/readme/", dev = "png")

```

```{nomnoml nomnoml-decorator, width = 4, height = 10}

#fontSize: 7
#spacing: 50
#padding: 20
#stroke: black
#.box: fill=lightblue visual=ellipse

[Final Document (.pdf/.html)] <- [<box>render_ecsa.R ]
[render_ecsa.R ] <- [Reviewed Draft (.Rmd)]
[Reviewed Draft (.Rmd)] <- [<box>merge_to_bookdown.R] 
[merge_to_bookdown.R] <- [Figure skeleton (.Rmd)]
[Reviewed Draft (.Rmd)] <- [<box>merge_to_bookdown.R] 
[merge_to_bookdown.R] <- [Text outline (google doc)]
[Figure skeleton (.Rmd)] -> [Text outline (google doc)]
[Text outline (google doc)] <- [<box>create_template.R]
[Figure skeleton (.Rmd)] <- [create_template.R]
[create_template.R] <- [Stock template (.Rmd)]

```

@rparrish
Copy link

@rparrish rparrish commented Aug 8, 2019

Try adding the "direction" directive:
#direction: down

@Robinlovelace
Copy link
Contributor

@Robinlovelace Robinlovelace commented Dec 24, 2019

Confirmation, this works:

nomnoml::nomnoml(" #direction: down
#.box: visual=ellipse fill=#8f8 bold fontsize=14
#.blob: visual=ellipse

  [<abstract>Zones]->[<database>Input data]
  [<abstract>Networks]->[Input data]
  [<abstract>OD]--:>[<box>Distribution]
  [<abstract>Scenarios]--:>[Input data]
  [Input data]->[<box>Trip generation]
  [Trip generation]->[<box>Distribution]
  [<box>Distribution]->[<box>Mode split]
  [Distribution]--:>[Trip generation] 
  [Mode split]->[<box>Assignment]
  [Mode split]--:>[Distribution]
  [Assignment]--:>[Mode split]
  [Assignment]--:>[<usecase>Evolution]")

Created on 2019-12-24 by the reprex package (v0.3.0)

Robinlovelace added a commit to Robinlovelace/nomnoml that referenced this issue Dec 24, 2019
javierluraschi added a commit that referenced this issue May 26, 2020
Close #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.