I'm new to Python programming and I've noticed that when using the 'matplotlib' library there is a ton of redundant calls when creating a visual plot. In other languages, you can use the "with" statement to reduce calls to the object and or statement. I get errors whenever I attempt it using those language's syntax (VBA/*.NET). Is there an equivalent way to do the reduce the calls to the "plt" statement? From the documentation, "with" in Python only appears to apply to objects, but is there another that would work on statements?
Example of what I'm looking for:
with plt
.xlabel("Time")
.ylabel("Amplitude")
end with