2D Data Plotting

  • Chapter
  • First Online:
Python Graphics
  • 595 Accesses

Abstract

In this chapter, you will look at styles and techniques for plotting two-dimensional data. You will start with some simple plots and then progress to those that include multiple sets of data on the same plot. While Python contains specialized built-in functions that can be quite efficient at this, usually requiring only a few lines of code, you will find that you can embellish your plots by taking a more hands-on approach and being creative by supplementing the specialized Python functions with simple Python commands. For example, the plot in Figure 8-1 requires only three lines of specialized code after the setup and data has been entered. Figure 8-5, on the other hand, can be a challenge to create using just specialized Python commands, but that is how it has been done by Listing 8-5. The use of simple commands, plus a little creativity, can often make the job much easier and produce better results. Following simple data plots, you will move on to linear regression where you fit a straight line to a data set. You will then see how to fit non-linear mathematical functions to the data. The last thing you explore is splines. A spline is a smooth curve that passes through each data point.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2023 Bernard Korites

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Korites, B. (2023). 2D Data Plotting. In: Python Graphics. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-9660-8_8

Download citation

Publish with us

Policies and ethics

Navigation