Intersection Symbol in Latex with PyPlotJS

Freya_the_Goddess
Mon, 08 Aug 2022 06:02:50 +0000
General Usage

Hi all,

I am playing around by creating venn diagram today, I want to know why I can’t make the intersection symbol appeared? Is it impossible? Thanks

Here is the code:

using PlotlyJS, LaTeXStrings

# Create scatter trace of text labels
p = plot(scatter(
    x=[1, 1.75, 2.5, 1.75],
    y=[1, 1, 1, 2.5],
    text=["A", L"A \cap B", "B", "C"],
    mode="text",
    textfont=attr(
        color="black",
        size=18,
        family="Arail",
    )
))

# Update axes properties

update_xaxes!(p,
    showticklabels=false,
    showgrid=false,
    zeroline=false,
)

update_yaxes!(p,
    showticklabels=false,
    showgrid=false,
    zeroline=false,
)

relayout!(
    p,
    margin=attr(l=20, r=20, b=100),
    height=600, width=800,
    plot_bgcolor="white",
    # Add circles
    shapes=[
        circle(
            line_color="blue", fillcolor="blue",
            x0=0, y0=0, x1=2, y1=2,
            opacity=0.3, xref="x", yref="y"
        ),
        circle(
            line_color="gray", fillcolor="gray",
            x0=1.5, y0=0, x1=3.5, y1=2,
            opacity=0.3, xref="x", yref="y"
        )
	,
        circle(
            line_color="green", fillcolor="green",
            x0=0.75, y0=1.5, x1=2.75, y1=3.5,
            opacity=0.3, xref="x", yref="y"
        )
    ]
)

p

7 posts - 4 participants

Read full topic