scientimate.plot2dsubplot#

scientimate.plot2dsubplot(x, y=None, plottype='line', cmapcolors='seq', sizestyle='medium')

Description#

Plot x and y data in 2-d subplots

Inputs#

x

x data as a 2-d array of (M,N)

y=[]

y data as a 2-d array of (M,N)

plottype=’line’
Plot type
‘line’: line plot
‘line_grid’: line plot with grid lines
‘scatter’: scatter plot
‘scatter_grid’: scatter plot with grid lines
‘bar’: bar plot
‘bar_grid’: bar plot with grid lines
‘barh’: horizontal bar plot
‘barh_grid’: horizontal bar plot with grid lines
‘histogram’: histogram plot
‘histogram_grid’: histogram plot with grid lines
cmapcolors=’seq’
Colormap style
‘blue’: blue colormap
‘red’: red colormap
‘green’: green colormap
‘yellow’: yellow colormap
‘purple’: purple colormap
‘brown’: brown colormap
‘gray’: gray colormap
‘blue_red’: blue-red colormap
‘red_blue’: red-blue colormap
‘blue_green’: blue-green colormap
‘green_blue’: green-blue colormap
‘green_yellow’: green-yellow colormap
‘yellow_green’: yellow-green colormap
‘red_yellow’: red-yellow colormap
‘yellow_red’: yellow-red colormap
‘cyclic’: cyclic/oscillation colormap
‘seq’: sequential colormap
User-defined colors may be used to generate colormap
User-defined colors should be defined as (M,3) array in RGB color format
At least two colors should be defined, i.e. M should be equal or larger than 2
User-defined colors values should be between 0 and 255
Any available colormap name such as ‘cool’, ‘winter’, etc also can be used
sizestyle=’medium’
Plot drawing size style
‘small’: small plot size
‘medium’: medium plot size
‘large’: large plot size

Outputs#

Examples#

import scientimate as sm
import numpy as np

x=np.random.rand(31,4)
sm.plot2dsubplot(x,[],'line','blue','medium')

x=np.random.rand(100,9)
sm.plot2dsubplot(x,[],'histogram','purple','medium')

References#

Colormap

Color