Dutton Extration

  • Home
  • Sitemap
Home  ›  Easy Way to Plot Rlocus by Hand

Easy Way to Plot Rlocus by Hand

Written By Rolland Famesonswed dimanche 7 août 2022 Add Comment Edit

question

JorgenSandberg-0942 avatar image

An easy way to plot in a Visual Studio 2019 C++ program.

I want to use Visual Studio 2019 C++ on my Windows 10 machine for simulation of a complex system (An alternative is OCTAVE, but that is not so fast). I need to plot data as the execution progresses.
I have searched the internet for ways to do the plotting and gnuplot is a possibility, but it is very complex to install and make work, and the descriptions, which I have found of how to install and use it, are incomplete.

Is there a step by step description for idiots/novices of how to install and use gnuplot in Visual Studio 2019 C++ ?

Is there a free plotting library offering 2D and 3D plotting in Visual Studio 2019 C++ and a step by step description of how to install and use?

I am aware that I may transfer data from the application to a plotting application, but that does not meet my needs.

Sorry, but I really need a complete and detailed description of the installation and use.

c++

You can use Direct2D/DirectX to use GPU hardware acceleration
I had posted a sample for a basic sine wave in VB (same code as in C++) in this thread
It is easy in 2D, but if you really need 3D, it is more complex...


0 Votes 0 ·

Castorix31, thank you for taking time to reply to my cry for help.

I am looking for something like what you show, but I need all details on how to get there both what I need to install and how to use it in my VS2019 C++ program. Your thread leads to an executable, I need a document providing details for a novice/idiot like me.

Regards,
Jorgen

0 Votes 0 ·

There is nothing to install
I just created a simple Direct2D app, like Creating a Simple Direct2D Application
then I mainly used D2D1SinCos + ID2D1RenderTarget::DrawLine to draw the sine , with InvalidateRect for the animation


0 Votes 0 ·

Dear Castorix31,

Once more, thanks a lot. It does not look simple, but I can use it.
I have noticed that this Q&A is followed by 7 people, hence I am not the only one, who would appreciate a good library for plotting in Visual Studio 2019 C++.

Is there a simpler solution?

Regards,
Jorgen Sandberg

0 Votes 0 ·

Is there a simpler solution?

There is the (very) old MS Chart control (eg Using the MS Chart control in VC++)
but not sure it could be usefuf in your case if you need to plot data while you receive them

0 Votes 0 ·

Dear Castorix31,
Thanks a lot.

Does anyone have an "for dummies guide" to the installation and use of gnuplot-iostream?

Regards,

Jorgen Sandberg

0 Votes 0 ·

Hi,

Regarding the usage guide of gnuplot-iostream, you can refer to this link. If you encounter other problems with installation or usage, I suggest you go to GitHub for help.


0 Votes 0 ·

Dear YujianYao-5145,

Thank you for taking time to reply to my question.

I have used that link a number of times and also been at GitHub, but there is this statement "Windows support basically works, but there are some troubles.", which puts me off.

It is my impression that there is no simple reliable way to add the capability of scientific plotting 2D and 3D in a VS2019 C++ program. I find it strange.

Regards
Jorgen Sandberg

0 Votes 0 ·

Castorix31 avatar image

Another simple way is to use System.Windows.Forms.DataVisualization.Charting
with C++/ CLR (Create C++ Windows Forms application in Visual Studio 2017)

A test (Chart added from Designer) :

136651-chart-clr.jpg

                                          this->chart1->Series->Clear();          this->chart1->Titles->Clear();          Title^ title1 = (gcnew Title());          title1->Text = L"Title Test";          this->chart1->Titles->Add(title1);               Series^ series1 = (gcnew Series());          series1->Name = L"Series Test";          this->chart1->Series->Add(series1);                   //series1->XValueType = ChartValueType::Auto;          this->chart1->ChartAreas[0]->AxisX->Interval = 1;                  series1->ChartType = SeriesChartType::FastLine;                       series1->Points->AddXY("January", 100);          series1->Points->AddXY("February", 200);          series1->Points->AddXY("March", 300);          series1->Points->AddXY("April", 500);          series1->Points->AddXY("May", 400);          series1->Points->AddXY("June", 800);          series1->Points->AddXY("July", 1000);          series1->Points->AddXY("August", 700);          series1->Points->AddXY("September", 500);          series1->Points->AddXY("October", 300);          series1->Points->AddXY("November", 600);          series1->Points->AddXY("December", 700);                                      

Actually, (I did not follow the link in your earlier comment I replied so thought you meant this component) this is what I use in plotting filter responses (my EQ software is a Windows Forms application) ... . So, moved my earlier post to here.

I use this component for to plot filter response(s) of an audio equalizer. It works well in realtime but chart updating gets clumsy with bigger size data series (I use 512 or 1024 for x-axel).

.136441-eqchart.png


0 Votes 0 ·

juhapartanen-5030 avatar image

Dear juhapartanen-5030,

Thank you for your suggestion. I have looked at the link, and I guess it is for a LINUX machine using the g++ compiler. I need it for a Windows 10 machine running VS2019 C++. I have also read that there are problems running python code with C++. I noticed the following statement on github for matplotlib-cpp "Therefore, I was looking for a C++ plotting library that was extremely easy to use and to add into an existing codebase, preferably header-only. When I found none,", so I am probably looking for the non-existing library.

Regards,
Jorgen Sandberg

0 Votes 0 ·

Dear juhapartanen-5030,

You are right. It is a matter of the effort I want to spend on making it work. I really do not want to get into the details of compatibility between operating systems, compilers and linkers on different machines. I am afraid of running into problems I can't solve due to a lack of knowledge.

I have searched and searched the internet. Currently, I am looking at DISLIN ( www.dislin.de), which seems very close to what I want. Do you have any experience with DISLIN?

Regards,
Jorgen Sandberg

0 Votes 0 ·

Hi,

Thanks for taking time to report this problem with us. Since your question is more related to DISLIN, you can go to DISLIN for support.


0 Votes 0 ·

I can strongly recommend DISLIN. It works with VS2019 C++.

Regards,
Jorgen Sandberg

0 Votes 0 ·

JorgenSandberg-0942 avatar image

Dear Castorix31,

Thanks a lot. It is, what I was looking for.

Regards,
Jorgen Sandberg

question details

Related Questions

duttonextration.blogspot.com

Source: https://docs.microsoft.com/en-us/answers/questions/567439/an-easy-way-to-plot-in-a-visual-studio-2019-c-prog.html

Share this post

0 Response to "Easy Way to Plot Rlocus by Hand"

Enregistrer un commentaire

Article plus récent Article plus ancien Accueil
Inscription à : Publier les commentaires (Atom)

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel

Popular Post

  • Cheese Fosters Home for Imaginary Friends Do It Again
    Goo is a fictional character from the Cartoon Network blithe tv set series Foster's Home ...
  • Ten Steps to Advancing College Reading Skills 6th Edition Answer Key
    ���������� ���� ...
  • We Are Unable to Complete Your Call at This Time Please Try Again Later
    Many Verizon, Cricket, AT&T, IRS, and fifty-fifty EDD users accept complained virtually getting the "your call ca...



banner



Copyright - Dutton Extration