How to use ECI coordinates to plot object

With the help of satellite.js I am getting ECI coordinates of a satellite. Now I want to plot orbit using those coordinates, but I don’t know how to do it. There is way to convert latitude and longitude to X Y coordinates and plot a line. But that will not work for most of the satellites. Please help me n such implementation. Let me know if more info required.