Git Product home page Git Product logo

Comments (6)

krassowski avatar krassowski commented on May 24, 2024 2
  1. update the package with:
devtools::install_github("krassowski/complex-upset")
  1. restart R if needed
  2. add sort_sets=FALSE
upset(
    movies, genres,
    base_annotations=list('Intersection size'=intersection_size(counts=FALSE)),
    min_size=100,
    width_ratio=0.1,
    sort_sets=FALSE
)

not_sorted_sets

the order is taken from the second argument, here genres:

Screenshot from 2020-03-24 16-11-16

from complex-upset.

krassowski avatar krassowski commented on May 24, 2024

For a global font size change, just update the themes:

upset(
    movies, genres,
    base_annotations=list('Intersection size'=intersection_size(counts=FALSE)),
    min_size=100,
    width_ratio=0.1,
    themes=upset_default_themes(text=element_text(size=30))
)

sizeupset

from complex-upset.

 avatar commented on May 24, 2024

And for ordering?

Btw, setting width_ratio to 1 results in the intersection size not being displayed

example

from complex-upset.

krassowski avatar krassowski commented on May 24, 2024

To modify only certain elements:

upset(
    movies, genres,
    base_annotations=list('Intersection size'=intersection_size(counts=FALSE)),
    min_size=100,
    width_ratio=0.1,
    themes=upset_modify_themes(
        list(
            'intersections_matrix'=theme(text=element_text(size=30)),
            'overall_sizes'=theme(axis.text.x=element_text(angle=90))
        )
    )
)

theme specific updates

I will add upset_modify_themes in the next release.

from complex-upset.

krassowski avatar krassowski commented on May 24, 2024

Wha exactly do you mean by "Ordering intersection matrix"? Changing the order of rows, or columns?

from complex-upset.

 avatar commented on May 24, 2024

Euh yes sorry, order of rows, in the example you posted for example, let's say I want Romance to be at the top, then Animation, Documentary, etc ...

from complex-upset.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.