Synastry Chart #
To create a Synastry Chart, create two subjects with AstrologicalSubjectFactory, build a synastry ChartDataModel via ChartDataFactory, then render with ChartDrawer.
Here is an example:
from pathlib import Path
from kerykeion import AstrologicalSubjectFactory
from kerykeion.chart_data.factory import ChartDataFactory
from kerykeion.charts.drawer import ChartDrawer
first = AstrologicalSubjectFactory.from_birth_data(
"John Lennon", 1940, 10, 9, 18, 30,
lng=-2.9833, lat=53.4, tz_str="Europe/London", online=False,
)
second = AstrologicalSubjectFactory.from_birth_data(
"Paul McCartney", 1942, 6, 18, 15, 30,
lng=-2.9833, lat=53.4, tz_str="Europe/London", online=False,
)
# Build synastry data and render
data = ChartDataFactory.create_synastry_chart_data(first, second)
drawer = ChartDrawer(data)
out_dir = Path("charts_output")
out_dir.mkdir(exist_ok=True)
drawer.save_svg(output_path=out_dir, filename="lennon-mccartney-synastry")
Note: If you want to save the output in a different directory, pass the output_path parameter to save_svg().
The output will be:
Aspect Table Grid View #
double_chart_aspect_grid_type="table" renders the dual-chart aspects as a grid
instead of the default "list", which is easier to scan when the two charts
share many contacts.
from pathlib import Path
from kerykeion import AstrologicalSubjectFactory
from kerykeion.chart_data.factory import ChartDataFactory
from kerykeion.charts.drawer import ChartDrawer
first = AstrologicalSubjectFactory.from_birth_data(
"John Lennon", 1940, 10, 9, 18, 30,
lng=-2.9833, lat=53.4, tz_str="Europe/London", online=False,
)
second = AstrologicalSubjectFactory.from_birth_data(
"Paul McCartney", 1942, 6, 18, 15, 30,
lng=-2.9833, lat=53.4, tz_str="Europe/London", online=False,
)
data = ChartDataFactory.create_synastry_chart_data(first, second)
drawer = ChartDrawer(data, double_chart_aspect_grid_type="table")
output_dir = Path("charts_output")
output_dir.mkdir(exist_ok=True)
drawer.save_svg(output_path=output_dir, filename="synastry-grid-view")