pylexis.Diagram.set_font(size, weight): Set font size and weight.
pylexis.Diagram.set_aspect(aspect): Set aspect ratio of the grid.
Parameters
----------
aspect: str or float with aspect ratio of the grid. Use 'square' for square cells, 'auto' for equal sized steps on both axes, or a float for a custom ratio.
Plotting
pylexis.Diagram.add_data_point(year, age, value): Draw a data point in the grid.
Parameters
----------
year: int with year of the data point.
age: int with age of the data point.
value: string-castable value of the data point.
pylexis.Diagram.add_data(year, age, values): Add a list of data points to the Lexis Diagram.
Parameters
----------
year: list[int] with years of the data points.
age: list[int] with age of the data points.
values: list of string-castable values of the data points.
pylexis.Diagram.add_data_unsafe(year, age, values): Add a list of data points to the Lexis Diagram without checking if the data fits in the grid.
Parameters
----------
year: list[int] with years of the data points.
age: list[int] with age of the data points.
values: list of string-castable values of the data points.
pylexis.Diagram.load_data(data, xaxis, yaxis, value): Load data from a list of dictionaries.
Parameters
----------
data: list of dictionaries with the data to plot.
xaxis: str with the key of the dictionary that contains the x-axis data.
yaxis: str with the key of the dictionary that contains the y-axis data.
value: str with the key of the dictionary that contains the value of the data point.
pylexis.Diagram.save(filename): Save the diagram to a file.
Parameters
----------
filename: str with the name of the file to save.
Modified Methods
Added 'random' as option for param color in pylexis.Diagram.lexis_fill
Added alpha param in method pylexis.Diagram.lexis_fill
Class Modifications
Added self.fontsize and self.fontweight to standardize font styling across plotted data
README
Updated README to include the new and updated methods
New methods
Styling
pylexis.Diagram.set_font(size, weight): Set font size and weight.
pylexis.Diagram.set_aspect(aspect): Set aspect ratio of the grid.
Plotting
pylexis.Diagram.add_data_point(year, age, value): Draw a data point in the grid.
pylexis.Diagram.add_data(year, age, values): Add a list of data points to the Lexis Diagram.
pylexis.Diagram.add_data_unsafe(year, age, values): Add a list of data points to the Lexis Diagram without checking if the data fits in the grid.
pylexis.Diagram.load_data(data, xaxis, yaxis, value): Load data from a list of dictionaries.
pylexis.Diagram.save(filename): Save the diagram to a file.
Modified Methods
'random'
as option for paramcolor
inpylexis.Diagram.lexis_fill
alpha
param in methodpylexis.Diagram.lexis_fill
Class Modifications
self.fontsize
andself.fontweight
to standardize font styling across plotted dataREADME