In environments like Atari space invaders state of the environment is its image, so in following line of code
observation, action, reward, _ = env.step()
observation
variable holds the actual image of the environment, but for environment like Cartpole the observation would be some scalar numbers.
Is it possible to somehow access the picture of states in those environments?
env.render(mode="rgb_array")
This would return the image (array) of the rendering which you can store. The camera angles can be set using distance, azimuth and elevation attributes of env.viewer.cam