Giter Club home page Giter Club logo

bubbleplot's Introduction

Bubbleplot

This Latex package provide a command to create a 3 facets bubble plot using PGF/TikZ.

Note that the CSV file and some of the keys can be generated automaticaly by the bubble_plot Python module.

Example

The following figure display a bubble plot generated with the following Latex code using the following dummy data.

Example of a bubble plot generated on Latex

Bubble plot are used, for instance in a Systematic Mapping Study. See Petersen, Kai, et al. "Systematic mapping studies in software engineering." Ease. Vol. 8. 2008 for a presentation of this methodology.

Documentation

The main command defined by the bubbleplot Latex package is \bubbleplot:

\documentclass{standalone}
\usepackage{bubbleplot}

\definecolor{2017}{rgb}{0.9248648648648647, 0.9751351351351352, 0.947027027027027}
\definecolor{2018}{rgb}{0.5511687604559576, 0.7592733771834118, 0.6429138065401041}
\definecolor{2019}{rgb}{0.1803921568627451, 0.5450980392156862, 0.3411764705882353}

\pgfplotsset{
    colormap={yearcolor}{
        color=(2017),
        color=(2018),
        color=(2019),
    }
}

\begin{document}
\bubbleplot[%% KEYS
    width=7mm,
    height=1cm,
    xmin=-10,
    xmax=8,
    ylabel=Snakes,
    meta=nbr,
    x field=x,
    enlarge y limits=0.3,
    x index field=ix,
    y field=y,
    y index field=iy,
    year field=years,
    year x shift=-1.4cm,
    year y shift=3.5cm,
    year padding=12,
    x left label=Fishes,
    x left label shift=3cm,
    x right label=Birds,
    x right label shift=2cm,
]
{example.csv} %% CSV FILE NAME
{2017, 2018, 2019} %% YEARS
\end{document}
  • YEARS is the ordered sequence of years used in the plot.
  • CSV FILE NAME is the CSV file generated by the Python module.
  • KEYS are the following pgfkeys keys:
    • width and height define the width and height of the plot.
    • xmin and xmax define the smallest and biggest value in the x axis.
    • ylabel is the label of the facet on the y axis.
    • enlarge y limits is the spacing between bubbles and the horizontal plot limits, default value 0.2.
    • x field is the labels on the x axis.
    • x index field is the x axis index of bubbles.
    • y field is the labels on the y axis y.
    • y index field is the y axis index of the bubbles.
    • meta is the occurrence displayed in each bubble.
    • year field is the year related score mapped to colour.
    • year x shift and year y shift allows to shift the year legend on the x axis and y axis.
    • year padding define the padding between each year in the legend, default value 12.
    • x left label and x right label define the facet label on the left and right parts of the x axis.
    • x left label shift and x right label shift allows to place the left and right labels relatively to the year legend.

Note that keys without default values must be set by the user, else the package will raise an error.

bubbleplot's People

Contributors

zar-rok avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.