Skip to content

swsamleo/Paper-Viz

Repository files navigation

PaperViz

Data Visualisation - CRUISE Group

Leader: Dr Wei Shao
Associated Leader: Dr Nan Gao
Team Member: Zhiqiu Chen, Ying Guo, Lanzhou Jiang, Junwei Ye, Yufan Kang, Haoran Ma, Zhengyuan Xu, Ziyan Peng

Professional Python graphs for Scientific Papers

These visualisation codes show visualization modules by Seaborn and Matplotlib of Python. The codes were written by Cruise Group of RMIT University. Please refer to the following contents for details. If you're not into reading lenghty explanations at all, feel free to jump right into the commented code.

Dependencies

If you want to run the codes, you need to install some other Python libraries in addition to Seaborn and Matplotlib, which have been marked in the codes section.

Install

The latest stable release (and required dependencies) can be installed from PyPI:

pip install paperviz

You may instead want to use the development version from Github:

pip install git+https://github.com/swsamleo/Paper-Viz.git

Paper-Viz is also available from Anaconda and can be installed with conda:

conda install paperviz

Development

Paper-Viz development takes place on Github: https://github.com/swsamleo/Paper-Viz

Documentation

By coloring the area between the axis and the line, the area map not only emphasizes the peaks and valleys, but also emphasizes the duration of the high and low points. The longer the high point lasts, the larger the area under the line. The stacked area plot can show the total value and item values, the percentage area chart can show the percentage of each item.

  • Multi-item area chart
  • Stacked area chart
  • Percentange area chart
import paperviz
model=paperviz.Area(path=paperviz.__path__[0])
model.plot()

Configuration:

  • file: file name of your data source
  • x_col_name: ['x_column_name_a','x_column_name_b'...]
  • paper_type : 'single' or 'double'

Multi-item area chart Stacked area chart Precentage area chart

A bar chart is a classic way to visualise items based on counting or any given indicator.

  • Single item bar chart
  • Multi-item grouped bar chart
  • Error bar chart with two groups
  • Stacked bar chart with two groups

Single item bar chart Multi-item grouped bar chart Error bar chart with two groups Stacked bar chart with two groups

A bubble chart is a variation of a scatter chart in which the data points are replaced with bubbles, and an additional dimension of the data is represented in the size of the bubbles. Just like a scatter chart, a bubble chart does not use a category axis — both horizontal and vertical axes are value axes.

  • Bubble chart with each bubble name and sizes
  • Multi-item bubble plot with categorical colors
  • Bubble plot with a color map
import paperviz
model=paperviz.Bubble(path=paperviz.__path__[0])
model.bubble_plot()

Configuration:

  • file: file name of your data source
  • x_col_name: The X column name
  • y_col_name: The Y column name
  • x_label: the content of x label
  • y_label: the content of y label

Bubble chart with each bubble name and sizes Multi-item bubble plot with categorical colors Bubble plot with a color map

A scatter plot is a basic chart used to study the relationship between two variables. If you have multiple groups in your data, you might want to visualize each group in a different color.

  • Single item scatter plot with trend line
  • Multi-item scatter plot
  • Scatter plot with multi-mark
import paperviz
model=paperviz.Scat(path=paperviz.path[0])
model.plot()

Configuration:

  • file: file name of your data source
  • x_col_name: The X column name
  • y_col_name: The Y column name
  • x_label: x axis label
  • y_label: y axis label

Single item scatter plot Multi-item scatter plot Scatter plot with multi-mark

Maps have been used for a long time to help people navigate on road journeys or comprehend the closeness of one site to another. The material on maps, as well as the maps themselves, have become digitized, interactive, and more attractive as they have been integrated into data analysis and reporting. Seeing location data mapped and integrated in visualizations has increased comprehension and provided a useful, fresh context for more people.

  • Point Map
  • KDE(Kernel density estimation) Map
  • Point and KDE(Kernel density estimation) Map
  • Sankey Map
  • Choropleth Map
  • Route Map

Point Map KDE(Kernel density estimation) Map Point and KDE(Kernel density estimation) Map Sankey Map Choropleth Map Route Map

A histogram is a graphical display of data using bars of different heights. In a histogram, each bar groups numbers into ranges. Taller bars show that more data falls in that range. A histogram displays the shape and spread of continuous sample data. The height can mean density or actual value.

  • Single item histogram with a density curve
  • Multi-item histogram which height means actual value
  • Stacked histogram
import paperviz
model=paperviz.Hist(path=paperviz.path[0])
model.plot()

Configuration:

  • file: file name of your data source
  • x_col_name: The X column name
  • paper_type : 'single' or 'double'

Single item histogram with a density curve Multi-item histogram Stacked histogram

A heatmap is a graphical representation of data where the individual values contained in a matrix are represented as colors.

  • Heatmap with values in blue to yellow colours
import paperviz
model=paperviz.Heat(path=paperviz.path[0])
model.plot()

Configuration:

  • file: file name of your data source
  • paper_type : 'single' or 'double'

Heatmap with values in blue to yellow colours

Time series plots are used to show how a given metric changes over time.

  • Time series plot with maximum, minimum values
  • Time series plot with peaks and troughs
  • Time series plot with multivariables
  • Time series plot with multiple plots
  • Time series plot with regional zoom-in
import paperviz
model=paperviz.Time(path=paperviz.path[0])
model.plot()

Configuration:

  • file: file name of your data source
  • paper_type : 'single' or 'double'
  • x_col_name: name of the date variable
  • y_col_name: list of names for y variable
  • start_time: the start date on the timeline
  • end_time: the end date on the timeline

Time series plot with maximum, minimum values Time series plot with peaks and troughs Time series plot with multivariables Time series with multiple plots Time series plot with regional zoom-in

A line chart or line plot or line graph or curve chart is a type of chart which displays information as a series of data points called 'markers' connected by straight line segments. It is a basic type of chart common in many fields.

  • Multi-line chart
  • Multi-item line chart with categorical colours and marks
  • Double axis line chart
  • Insetplot line chart
import paperviz
model=paperviz.Line(path=paperviz.__path__[0])
model.plot()

Configuration:

  • file: file name of your data source
  • x_col_name: ['index'] or ['x_column_name_a','x_column_name_b'...]
  • y_col_name: ['y_column_name_a','y_column_name_b'...]
  • x_label: x axis label
  • y_label: y axis label
  • legend_label: legend labels names
  • paper_type: 'single' or 'double'

Multi-line chart Multi-item line chart with categorical colours and marks Double axis line chart Insetplot line chart

A pie chart is the classic way of displaying composition. However, it is generally not recommended now because sometimes the area of the pie would be misleading. Therefore, if you want to use a pie chart, it is highly recommended to explicitly note the percentage or number of each part in the pie chart.

  • Pie chart with outside annotation
  • Pie chart with percentage marked on and changable radius and font size
  • Pie chart with some labels exploration
  • Multi-layer pie chart
import paperviz
model=paperviz.Time(path=paperviz.path[0])
model.plot()

Configuration:

  • file: file name of your data source
  • paper_type: 'single' or 'double'

pie_chart_with_outside_annotation pie_chart_with_changeable_radius_and_fontsize pie_chart_with_label_exploration multi layer pie chart

The pyramid can be used to show the distribution of groups sorted by number, or it can be used to show the step-by-step filtering of the population.

  • Pyramid with actual value annotation
  • Pyramid with sort functions
import paperviz
model=paperviz.Pie(path=paperviz.path[0])
model.plot()

Configuration:

  • file: file name of your data source
  • x_col_name: ['index'] or ['x_column_name_a','x_column_name_b'...]
  • y_col_name: ['y_column_name_a','y_column_name_b'...]
  • paper_type: 'single' or 'double'

Population pyramid with annotation Population pyramid with sort function

A box plot or boxplot is a method for graphically depicting groups of numerical data through their quartiles. Displays the five-number summary of a set of data. The five-number summary is the minimum, first quartile, median, third quartile, and maximum.

  • Multi-item box plot
  • Multi-item box plot with annotation
import paperviz
model=paperviz.Bar(path=paperviz.__path__[0])
model.plot()

Configuration:

  • file: file name of your data source
  • x_col_name: ['x_column_name_a','x_column_name_b'...]
  • paper_type : 'single' or 'double'
  • x_label: the content of x label
  • y_label: the content of y label

Multi-item box plot Multi-item box plot with annotation

A radar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart of three or more quantitative variables represented on axes starting from the same point. The relative position and angle of the axes is typically uninformative.

  • Radar chart with single groups
  • Radar chart with multiple groups
  • Spider chart with multiple groups
import paperviz
model=paperviz.Radar(path=paperviz.path[0])
model.plot()

Configuration:

  • file: file name of your data source, it support csv/excel,text.for example:'new_file.csv'
  • index_col: The index column. Normally it should be the name of the content
  • category_col: input list of attributes for the radar plot
  • y_col_name: input list of items
  • y_lim: The Y lim value

Radar chart with single groups Radar chart with multiple groups Spider chart with multiple groups

A violin plot is a method of plotting numeric data. It is similar to a box plot, with the addition of a rotated kernel density plot on each side.

  • Violin plot
  • category violin plot
import paperviz
model=paperviz.Radar(path=paperviz.path[0])
model.plot()

Configuration:

  • file: file name of your data source
  • x_col_name: ['x_column_name_a','x_column_name_b'...]
  • paper_type : 'single' or 'double'

Violin plot category violin plot

About

This project is lead by Dr Wei Shao

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages