1. Homepage
  2. Programming
  3. CS16 Assignment - Matplotlib for C++

CS16 Assignment - Matplotlib for C++

Engage in a Conversation
CS16MatplotlibC++

Introduction CourseNana.COM

Plotting on x-y axes is one of the most useful ways you can show data and trends, whether you are an academic researcher or an industry professional. This is relatively easy to do with programming tools like Matlab where the plotting functionality is built right in. Programming languages like Python utilize Matlab tools in the commonly used matplotlib library, which allows easy generation and embedding of plots. CourseNana.COM

  CourseNana.COM

Unfortunately, it is not so easy in C++. There's no plotting library in C++ which is as widely used as matplotlib in Python. However, it is still possible to generate plots using C++ - your task in this extra credit assignment is to tell us how. CourseNana.COM

  CourseNana.COM

Description CourseNana.COM

In this assignment you will: CourseNana.COM

  CourseNana.COM

1.Find a way to generate a plot with a C++ script. The plot must be generated from the compilation/execution of the C++ code alone. I have provided some sample wavelength/power data from a green LED here ( . csv) and here (tab-delimitted . txt) that you may plot. CourseNana.COM

  CourseNana.COM

2. Write a script that successfully uses this plotting tool to plot. If you plot different data than what I have linked above provide this source data in your submission. CourseNana.COM

  CourseNana.COM

 Write instructions for how to use this plotting tool. These instructions must be detailed keep track of what issues you run into when attempting to use the tool so that you can address them in the write-up. We will be following your instructions in the write-up and attempt to plot using you method, so make sure it's detailedi This is how the teaching team will determine how manv points to award. Write every step you needed to do in order to use the tool. CourseNana.COM

  CourseNana.COM

·      Ex: If you just need to include a header file or library at the top or your script to plot, how do you link these libraries? If you try to port matplotlib to C++ using matplotlibcpp . h (see below), there are issues finding the <Python.h> and
<numpy /arrayobject h>. If you have Python with numpy installed, you likely already have these headers. In the write-up, you would need to address how you linked these to compile and run your script using matplotlibc pp . h (update  include path, include directories during compilation). CourseNana.COM

·      After updating your include path (to remove errors in VS Code), you will need to include this directory while compiling your file. A usefule guide for updating your make file is located here. CourseNana.COM

  CourseNana.COM

Submit your code ( . cpp file), source for plot data (if using different data), resulting plot, any additional headers/files that you need to #include and write-up to me by the deadline. If you added anything to your #include paths to run your code, send me your include paths  and updated make f ital I will need all five of these to verify your work! CourseNana.COM

  CourseNana.COM

Again, I will be following your instructions in the write-up and attempt to plot using you method, so make sure it's as detailed as possible. I will determine points as follows: CourseNana.COM

+5% to your final grade: Submitted all required documents. Write-up and submissions were sufficient for me/TAs to follow and plot using your chosen method (ie: can an experienced coder follow your instructions and plot using them alone?) CourseNana.COM

* +2o/o to your final grade: Submitted all required documents. Write-up was notsufficient or was missing key information that a user needs in order to plot using your chosen method. CourseNana.COM

  CourseNana.COM

No credit for an incomplete assignment. If I see you have just copy-pasted Places to start You may use any plotting method you wish as long as it is available from within a C++ script. However, if you are struggling, here are some places you can start from: CourseNana.COM

  CourseNana.COM

* MatPlotLib for C++: As mentioned above, you can port ma t plo t 1 ib to C++ with a header "matplotlibcpp. h" . A link to instructions and the source files for this are located here on GitHub. If you are used to plotting in Python, this may be a good place to start. CourseNana.COM

gnuplo t fof C++: A useful writeup for this is located here. In addition to saning up your #include paths for the header file, you will also need the Boos t library (available here - if you have a Mac and Homebrew, you can also just run brew  instalL  boost interminal). CourseNana.COM

  CourseNana.COM

·QCustomPlot: QCus t omP to t is a Qt C++ widget for plotting and data visualization. It has no further dependencies and is well documented. This requires the Qt library, which you may be able to get a free license for. Due to the license requirement, I recommend you try the above two methods or another method first. CourseNana.COM

  CourseNana.COM

By the deadline, submit the following: CourseNana.COM

  CourseNana.COM

Your . cpp file
Your inc Lude path and any additional files you need to include locally to run your file (ie: a header like ma t plo tl ibcpp . h)
Images that result from your code - your command line, resulting plot, etc. Also include the source data for the plot (if using data different than the green LED data I provided above).
Your detailed write-up. Remember, this write-up should be something you can give to a classmate that they can follow with no additional instructions in order to achieve the same plotted results CourseNana.COM

  CourseNana.COM

  CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
CS16代写,Matplotlib代写,C++代写,CS16代编,Matplotlib代编,C++代编,CS16代考,Matplotlib代考,C++代考,CS16help,Matplotlibhelp,C++help,CS16作业代写,Matplotlib作业代写,C++作业代写,CS16编程代写,Matplotlib编程代写,C++编程代写,CS16programming help,Matplotlibprogramming help,C++programming help,CS16assignment help,Matplotlibassignment help,C++assignment help,CS16solution,Matplotlibsolution,C++solution,