Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connectivity plots #68

Open
frank1010111 opened this issue Oct 14, 2023 · 1 comment
Open

Connectivity plots #68

frank1010111 opened this issue Oct 14, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@frank1010111
Copy link
Owner

frank1010111 commented Oct 14, 2023

Is your feature request related to a problem? Please describe.
I like to see the connectivity between injectors and producers at a map level.

Describe the solution you'd like
Given a fit CRM model and injector and producer locations, there should be a matplotlib quiver plot. with arrows given lengths and colors commensurate with the connectivity. This should be in a new submodule importable through pywaterflood.plotting.

Additional context
A demo plot looks like this
image

@frank1010111 frank1010111 added the enhancement New feature or request label Oct 14, 2023
@frank1010111
Copy link
Owner Author

The code to generate that plot was

fig, ax = plt.subplots(figsize=(8, 5))
ax.set_title(s)

for i, row in locdata.iterrows():
    color = "forestgreen" if row["SYM"] == "OIL" else "xkcd:plum"
    ax.annotate(i, (row["SURFX ft"]+0.05, row["SURFY ft"]), color=color, size=8)
    
g = sns.scatterplot(
    data=locdata,
    x="SURFX ft",
    y="SURFY ft",
    hue="SYM",
    palette=["forestgreen", "xkcd:plum"],
    style="SYM",
    style_order=["OIL", "INJ"],
    hue_order=["OIL", "INJ"],
    markers=["o", "D"],
    ax=ax,
    alpha=0.5,
)
q = plt.quiver(
    data["X"],
    data["Y"],
    data["x_arrow"],
    data["y_arrow"],
    data["Gain"],
    scale=5.5,
    cmap="plasma",
)
plt.colorbar(label="Connectivity")
ax.set(xlabel="X (kft)", ylabel="Y (kft)")
ax.axis("equal")
ax.quiverkey(q, 0.9, 1.05, 0.5, r"$\lambda$=1/2", labelpos="E")
sns.despine(left=True, bottom=True)

@frank1010111 frank1010111 added the help wanted Extra attention is needed label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant