diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html new file mode 100644 index 0000000..d45b7bd --- /dev/null +++ b/CODE_OF_CONDUCT.html @@ -0,0 +1,127 @@ + +Contributor Covenant Code of Conduct • legendry + Skip to contents + + +
+
+
+ +
+ +
+

Our Pledge

+

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

+

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

+
+
+

Our Standards

+

Examples of behavior that contributes to a positive environment for our community include:

+
  • Demonstrating empathy and kindness toward other people
  • +
  • Being respectful of differing opinions, viewpoints, and experiences
  • +
  • Giving and gracefully accepting constructive feedback
  • +
  • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
  • +
  • Focusing on what is best not just for us as individuals, but for the overall community
  • +

Examples of unacceptable behavior include:

+
  • The use of sexualized language or imagery, and sexual attention or advances of any kind
  • +
  • Trolling, insulting or derogatory comments, and personal or political attacks
  • +
  • Public or private harassment
  • +
  • Publishing others’ private information, such as a physical or email address, without their explicit permission
  • +
  • Other conduct which could reasonably be considered inappropriate in a professional setting
  • +
+
+

Enforcement Responsibilities

+

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

+

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

+
+
+

Scope

+

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

+
+
+

Enforcement

+

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at . All complaints will be reviewed and investigated promptly and fairly.

+

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

+
+
+

Enforcement Guidelines

+

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

+
+

1. Correction

+

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

+

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

+
+
+

2. Warning

+

Community Impact: A violation through a single incident or series of actions.

+

Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

+
+
+

3. Temporary Ban

+

Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

+

Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

+
+
+

4. Permanent Ban

+

Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

+

Consequence: A permanent ban from any sort of public interaction within the community.

+
+
+
+

Attribution

+

This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

+

Community Impact Guidelines were inspired by [Mozilla’s code of conduct enforcement ladder][https://github.com/mozilla/inclusion].

+

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

+
+
+ +
+ + +
+ + + + + + + diff --git a/articles/guide_composition.html b/articles/guide_composition.html index 24d622b..cdba415 100644 --- a/articles/guide_composition.html +++ b/articles/guide_composition.html @@ -95,7 +95,7 @@

Stacking theme(axis.line = element_line()) standard + guides(x = guide_axis_stack("axis", "axis", "axis")) -

+

In legendry, we have the same composition operation: compose_stack(). For your regular axis guides for the x and y aesthetics, it works the same way as @@ -112,7 +112,7 @@

Stacking colour = guide_colbar(first_guide = staxis, second_guide = "none") ) + theme(legend.axis.line = element_line()) -

+

Primitives @@ -143,7 +143,7 @@

Primitivesprimitive_labels(), theme = theme_guide(spacing = unit(5, "pt")) ))

-

+

Introducing the rest of the family

@@ -168,7 +168,7 @@

Introducing the rest of the family primitive_spacer(unit(0.5, "cm")), primitive_fence(range_key, rail = "outer") ))

-

+

The last member of the family is primitive_title(). Aside from just displaying text, it does three things:

    @@ -187,7 +187,7 @@

    Introducing the rest of the family ), primitive_title("Gollum explains engine displacement to you") )) + labs(x = "A normal person explains engine displacement") -

    +

    1. As it is implemented as a guide, it cannot take the place of regular axis titles. This also means that the titles will repeat over @@ -196,7 +196,7 @@

      Introducing the rest of the family
       last_plot() +
         facet_grid(~ year)
      -

      +

      Don’t use primitives directly @@ -220,7 +220,7 @@

      Don’t use primitives directly# Looks identical to the above standard + guides(x.sec = primitive_ticks())

      -

      +

      @@ -249,7 +249,7 @@

      Sandwiching= primitive_ticks() ) )

      -

      +

      They are called ‘text’ and ‘opposite’ because the ‘text’-guide will take on the position indicated by the legend.text.position theme element. Perhaps unsurprisingly; the guide at the other end is @@ -257,7 +257,7 @@

      Sandwiching
       last_plot() + theme(legend.text.position = "left")
      -

      +

      It should also be noted that if the guide has a label-supression mechanism, the ‘opposite’ guide will be drawn with surpressed labels. The mechanism is in place in guides like @@ -279,7 +279,7 @@

      Sandwichingscale_colour_viridis_c( guide = guide_colbar(vanilla = FALSE) ) -

      +

      The only thing that guide_colbar() does, that compose_sandwich() does not, is to adjust the theme settings to match ggplot2::guide_colourbar() more @@ -309,7 +309,7 @@

      My first gizmo scale_colour_viridis_c( guide = gizmo_barcap() ) -

      +

      Similarly guide_colsteps() has gizmo_stepcap(), which might be the second gizmo you may already have encountered.

      @@ -336,7 +336,7 @@

      Exotic gizmos= compose_stack("axis", my_gizmo), colour = compose_sandwich(middle = my_gizmo, text = "axis_base") ) -

      +

      Perhaps some gizmo’s that are inherently more useful are gizmo_density() and gizmo_histogram(). By default, these wrap the density() and hist() @@ -357,7 +357,7 @@

      Exotic gizmos= "D", guide = gizmo_histogram(hist.args = list(breaks = 10)) ) -

      +

      However, you can easily promote these gizmos to full guide by adding an axis. The compose_sandwich() can do a reasonable job for this.

      @@ -378,7 +378,7 @@

      Exotic gizmos= "axis_base" ) ) -

      +

      @@ -401,11 +401,11 @@

      Other compositionsstandard + guides(y.sec = compose_ontop("axis", top)) + labs(title = "compose_ontop")

      -

      +

       standard + guides(y.sec = compose_stack("axis", top)) +
         labs(title = "compose_stack")
      -

      +

      There is also compose_crux() (or ‘cross’) that is the parent composition of compose_sandwich(). Instead only allowing bread on two sides, it can also put guides on the top and @@ -428,7 +428,7 @@

      Other compositions= ball, bottom = block ) ) -

      +

      diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-11-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-11-1.png new file mode 100644 index 0000000..a1d6eb1 Binary files /dev/null and b/articles/guide_composition_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-13-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-13-1.png index d09ddfe..24794e3 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-13-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-14-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-14-1.png index bdb593a..d09ddfe 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-14-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-15-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-15-1.png index 2a3959e..bdb593a 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-15-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-16-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-16-1.png index 5084281..2a3959e 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-16-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-17-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-17-1.png index 841a0df..5084281 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-17-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-18-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-18-1.png index 7139b3a..841a0df 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-18-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-18-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-19-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-19-1.png index 822be0e..7139b3a 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-19-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-19-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-20-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-20-1.png index 5df01ab..822be0e 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-20-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-20-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-20-2.png b/articles/guide_composition_files/figure-html/unnamed-chunk-20-2.png new file mode 100644 index 0000000..d41dc38 Binary files /dev/null and b/articles/guide_composition_files/figure-html/unnamed-chunk-20-2.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-21-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-21-1.png new file mode 100644 index 0000000..5df01ab Binary files /dev/null and b/articles/guide_composition_files/figure-html/unnamed-chunk-21-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-3-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-3-1.png index 98be92f..631d97d 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-3-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-4-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-4-1.png new file mode 100644 index 0000000..98be92f Binary files /dev/null and b/articles/guide_composition_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-6-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-6-1.png index d7af2ca..45a6d55 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-6-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-7-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-7-1.png index 1816739..d7af2ca 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-7-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-8-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-8-1.png index 3c4ca48..1816739 100644 Binary files a/articles/guide_composition_files/figure-html/unnamed-chunk-8-1.png and b/articles/guide_composition_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/articles/guide_composition_files/figure-html/unnamed-chunk-9-1.png b/articles/guide_composition_files/figure-html/unnamed-chunk-9-1.png new file mode 100644 index 0000000..3c4ca48 Binary files /dev/null and b/articles/guide_composition_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/keys.html b/articles/keys.html index 45b06c8..52b58d3 100644 --- a/articles/keys.html +++ b/articles/keys.html @@ -132,7 +132,7 @@

      Why use keys?= "log10", guide = guide_colbar(key = logkey) ) -

      +

      Regular keys @@ -156,7 +156,7 @@

      Regular keysmy_key <- key_manual(aesthetic = c(2, 4, 6), label = c("two", "four", "six")) standard + guides(x = guide_axis_base(key = my_key))

      -

      +

      In addition, you can provide some automatic keys as keywords. Setting key = "minor", is the same as setting key = key_minor(). In the same fashion many other @@ -164,7 +164,7 @@

      Regular keys
       standard + guides(x = guide_axis_base(key = "minor"))
      -

      +

      Some keys don’t directly return data frames, but return instructions on how these keys should interact with scales. For example key_auto(), the default key for many guides in legendry, @@ -180,8 +180,8 @@

      Regular keys#> class(df) <- c("key_standard", "key_guide", class(df)) #> df #> } -#> <bytecode: 0x56072cc02a60> -#> <environment: 0x56072cc03ac8> +#> <bytecode: 0x55f7b8e674d8> +#> <environment: 0x55f7b8e685b0>

      We can preview what values they’d label by letting the key absorb a scale with known limits.

      @@ -225,7 +225,7 @@ 

      Ranged keysggplot(economics, aes(date, unemploy)) + geom_line() + guides(x.sec = primitive_bracket(ranges))

      -

      +

      There is also an ‘automatic’ ranged key, which attempts to find patterns in the key labels.

      @@ -237,7 +237,7 @@ 

      Ranged keys= "Drive train" ) plot

      -

      +

      For example an obvious pattern in the x-axis labels of the plot above is that you first have 3 entries for the 3 drive trains in 1999, followed by 3 drive trains in 2008. By default, @@ -249,7 +249,7 @@

      Ranged keyskey <- key_range_auto(sep = "\\.") plot + guides(x = primitive_bracket(key = key)) -

      +

      @@ -281,7 +281,7 @@

      Piping keysggplot(economics, aes(date, unemploy)) + geom_line() + guides(x.sec = primitive_bracket(key))

      -

      +

      Formatting keys @@ -295,7 +295,7 @@

      Formatting keysggplot(mpg, aes(displ, hwy)) + geom_point() + guides(x = guide_axis_base(key = key_auto(colour = "red", face = "bold")))

      -

      +

      In some cases where you know the label in advance, which is almost every time one uses key_manual(), key_map() or their ranged equivalents, you can even vectorise these formatting @@ -314,7 +314,7 @@

      Formatting keysggplot(economics, aes(date, unemploy)) + geom_line() + guides(x.sec = guide) -

      +

      Forbidden keys @@ -329,7 +329,7 @@

      Forbidden keysmy_sequence_key <- key_sequence(n = 20) standard + guides(x = guide_axis_base(key = my_sequence_key))

      -

      +

      The reason for this is that this key was designed for colour gradients

      @@ -338,7 +338,7 @@ 

      Forbidden keys scale_colour_viridis_c( guide = gizmo_barcap(key = my_sequence_key) )

      -

      +

      Likewise, key_bins() was not designed for regular guides, but is specific to colour steps.

      @@ -349,7 +349,7 @@ 

      Forbidden keys scale_colour_viridis_c( guide = gizmo_stepcap(key = my_bins_key) )

      -

      +