Practical Python Data Visualization by Ashwin Pajankar

Practical Python Data Visualization by Ashwin Pajankar

Author:Ashwin Pajankar
Language: eng
Format: epub
ISBN: 9781484264553
Publisher: Apress


This code creates 11 numbers (0–10, both inclusive) as follows:[ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.]

We can visualize this as follows:y = x

plt.plot(x, y, 'o--')

plt.axis('off')

plt.show()

The output is displayed in Figure 5-3.

Figure 5-3Output of y = x with linspace()

As you can see , we are turning off the axis with the line plt.axis('off').

Similarly, we can compute and visualize values in the logspace as follows:y = np.logspace(0.1, 1, N)

print(y)

plt.plot(x, y, 'o--')

plt.show()



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.