<jupyter_start><jupyter_text>Example: CanvasXpress kaplanmeier Chart No. 2This example page demonstrates how to, using the Python package, create a chart that matches the CanvasXpress online example located at:https://www.canvasxpress.org/examples/kaplanmeier-2.htmlThis example is generated using the reproducible JSON obtained from the above page and the `canvasxpress.util.generator.generate_canvasxpress_code_from_json_file()` function.Everything required for the chart to render is included in the code below.  Simply run the code block.<jupyter_code>from canvasxpress.canvas import CanvasXpress 
from canvasxpress.js.collection import CXEvents 
from canvasxpress.render.jupyter import CXNoteBook 

cx = CanvasXpress(
    render_to="kaplanmeier2",
    data={
        "y": {
            "vars": [
                "p1",
                "p2",
                "p3",
                "p4",
                "p5",
                "p6",
                "p7",
                "p8",
                "p9",
                "p10",
                "p11",
                "p12",
                "p13",
                "p14",
                "p15",
                "p16",
                "p17",
                "p18",
                "p19",
                "p20"
            ],
            "smps": [
                "Time",
                "Censor",
                "Censor1"
            ],
            "data": [
                [
                    24,
                    0,
                    1
                ],
                [
                    3,
                    1,
                    0
                ],
                [
                    11,
                    0,
                    1
                ],
                [
                    19,
                    0,
                    1
                ],
                [
                    24,
                    0,
                    1
                ],
                [
                    13,
                    0,
                    1
                ],
                [
                    14,
                    1,
                    0
                ],
                [
                    2,
                    0,
                    1
                ],
                [
                    18,
                    0,
                    1
                ],
                [
                    17,
                    0,
                    1
                ],
                [
                    24,
                    0,
                    1
                ],
                [
                    21,
                    0,
                    1
                ],
                [
                    12,
                    0,
                    1
                ],
                [
                    1,
                    1,
                    0
                ],
                [
                    10,
                    0,
                    1
                ],
                [
                    23,
                    1,
                    0
                ],
                [
                    6,
                    0,
                    1
                ],
                [
                    5,
                    1,
                    0
                ],
                [
                    9,
                    0,
                    1
                ],
                [
                    17,
                    1,
                    0
                ]
            ]
        }
    },
    config={
        "graphType": "Scatter2D",
        "showConfidenceIntervals": True,
        "showDecorations": True,
        "showLegend": False,
        "showTransition": False,
        "title": "Kaplan-Meier Plot"
    },
    width=613,
    height=613,
    events=CXEvents(),
    after_render=[
        [
            "addKaplanMeierCurve",
            [
                "Time",
                "Censor",
                None,
                None,
                None
            ]
        ]
    ],
    other_init_params={
        "version": 35,
        "events": False,
        "info": False,
        "afterRenderInit": False,
        "noValidate": True
    }
)

display = CXNoteBook(cx) 
display.render(output_file="kaplanmeier_2.html")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07617504051863858, 'fraction_numerical': 0.027552674230145867, 'mean_word_length': 0.514726507713885, 'pattern_counts': {'":': 15, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '533252', 'license': 'MIT', 'n_tokens_mistral': 1136, 'n_tokens_neox': 962, 'n_words': 199, 'path': 'tutorials/notebook/cx_site_chart_examples/kaplanmeier_2.ipynb', 'repo_name': 'docinfosci/canvasxpress-python', 'size': '4319'}