Cods for importing plot retrieved from DB

Instead of getting them from the layers, we
can easily retrieve them from the database.