<｜begin▁of▁sentence｜>### Instruction:
As a software developer working on a network visualization tool, you're tasked with implementing functionality that displays a simple, non-intersecting linear graph representation. Specifically, your current assignment involves rendering a path graph comprising 4 nodes.

Your objective is to devise an algorithm that calculates the optimal coordinates for each of these 4 nodes, such that when presented on a 2D plane, none of the edges intersect, ensuring a clear and straightforward visual representation of the path graph.

For testing purposes, your algorithm will be applied to a dataset representing this path graph. Once the positions are determined, integrate the layout into the graphical interface of the application you are developing, making sure the visual output is both accurate and user-friendly. Remember to maintain data integrity and ensure the visual depiction accurately reflects the underlying structure of the path graph.
### Response:
import networkx as nx
import matplotlib.pyplot as plt

# Create a NetworkX graph
G = nx.path_graph(4)

# Compute the planar layout
pos = nx.planar_layout(G)

# Draw the graph using the planar layout
nx.draw(G, pos, with_labels=True)
plt.show()
<|EOT|>
