thclark / cpplot Goto Github PK
View Code? Open in Web Editor NEWInteractive graphs and charts for C++, viewable in-browser
Home Page: https://cpplot.readthedocs.io
License: MIT License
Interactive graphs and charts for C++, viewable in-browser
Home Page: https://cpplot.readthedocs.io
License: MIT License
Add one or more of:
From https://gitlab.com/daverona/pre-commit-cpp to the pre-commit hooks that get invoked.
Since some windows users are getting involved (#6) make sure line endings etc are always consistent (although it's less of an issue nowadays with IDEs being sensible) using:
HI,
I got an error;
CMake Error: The source directory "/home/peng/cpplot/build" does not exist.
when using;
cmake . -B build
Any idea about this?
Thank you so much!
TODO:
Actually, its' getting very difficult to import & starting project. Basically, if you can add "Getting Started" section.
NOTE: There was a mention in the README of C++ API. What's the status of the project?
As I see your project uses conan as a package manager I would like to ask if you are planning to upload a conan package on bintray or conan-center?or if you would allow me to do it
Plotly provides a JSONSchema for graph objects which, assuming the schema is correct, should guarantee that the output is renderable.
Currently, production of figures can be hit-and-miss, since the outgoing JSON is not validated against the schema. If there is an error in production of the graph, there will be no way of knowing this until it's rendered (or not) and no meaningful information about why; unless you also know enough about javascript to be introspecting the errors on display-side.
Addition of a validate
option would enable users to check that their JSON is plotly-compliant against the schema as the JSON is generated, as opposed to some time later when it's viewed; and create reasonable-looking error messages in the event of non-compliance.
I don't believe it's possible to do this at compile-time whilst still supporting modern features of C++.
Figure write-to-disk is called as an async task, so it doesn't block the main computation thread.
That significantly speeds up execution for scenarios where you have other computation to proceed with (e.g. a flow solver where you're printing out monitor charts each timestep, but don't want to pause execution of the main solution to serialise all that json to figures).
However, figure writing is still done within the main background thread, so the program execution can never be quicker than the length of time required to write the figures. In most cases this is fine, but if you want the main program to execute then return quicker than the figure writes, that could be a problem.
Consider creating daemonised threads for writing figures so the task is (optionally) offloaded and may or may not be completed after program execution ends.
Votes and +1s, anyone??
I am considering trying it with Win 10 MSVS 2015 and 64 bit
Hi. Just cloned the project and tried to compile by including the library path into my compiler's path and got this:
11:35:13 || ~/tmp
[[email protected]]$ g++ -std=c++17 a.cpp -I ./matplotplusplus/source/
In file included from ./matplotplusplus/source/matplot/util/common.h:8,
from ./matplotplusplus/source/matplot/matplot.h:9,
from a.cpp:2:
./matplotplusplus/source/matplot/detail/config.h:11:10: fatal error: matplot/detail/exports.h: No such file or directory
11 | #include <matplot/detail/exports.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
conan install . --install-folder C:/Users/xxxx/github/cpplot/build/release
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.runtime=MD
compiler.version=14
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
ERROR: cpr/1.5.0: Error in configure() method, line 39
if self.options["libcurl"].with_openssl == False: # 'is False' doesn't work here (see conan-io/conan#3620)
ConanException: option 'with_openssl' doesn't exist
Possible options are []
I was using the conan-center as my remote.
Use the es-flow documentation as a basis to implement proper documentation for cpplot.
Include at first:
To follow #6 using this guide for conan based travis testing
Use the python template repository as a basis for on-commit linting and documentation build.
Works toward #5
First: I love this. I have been searching for a way to have plotly on C++. I'm plotting graphs of temperature against time. Currently I'm doing this in QT with QTCharts and graphing that way you can define an axis as time. Right now my time object, pre-cpplot is a QLineSeries where the QDateTime is converted with toMSecsSinceEpoch() and with my axis definition I get a good visual on the QChart of the time formatted in a way you can understand. I was able to work out from your tutorial how to use VectorXD where I used to use QLineSeries to plot my data but I can't seem to figure out a way to get a proper time axis on X. I do have a python version of my app that does use plotly which has a nice date axis, but on that one the app reads a csv and with pandas I can use parse_dates=(the one that's my time column) and plotly just works without me having to do anything. How do I do this with cpplot? Sorry for the rambling..
This is what you have:
A cross-platform compilation file is provided using cmake, itβs not tested on windows but might actually work, since it uses conan to handle all the tricky dependencies.
git clone https://github.com/thclark/cpplot
cd cpplot && cmake install
Running "cmake install"
CMake Error: The source directory "C:/Users/xxxxx/github/cpplot/install" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
So then I tried my std. out of source build technique:
mkdir build
cd build
cmake .. -G Ninja
Got your error ...
So I did a
conan install .. --install-folder C:/Users/xxxxx/github/cpplot/build
Got a coffee as Conan churned ...
then another
cmake .. -G Ninja
ninja
ignoring unknown option '-std=c++11' ....Hmmm
fatal error C1189: #error: ERROR macro is defined. Define GLOG_NO_ABBREVIATED_SEVERITIES before including logging.h. See the document for detail.
So kinda sorta worked ... looking into the error
Time for a code review. This library was started as me hacking and copying/pasting bits from other libraries, and hasn't really had a coherent design, either of the API or the internal workings.
Now there's a bit of momentum in the stars, and while versioning is still v0.0.x, it is a good time to spot and redesign architectural problems that will turn into a headache later on.
For that I need one or two volunteers who:
I'd love to use cpplot, but hesitate to do so as it seems it has been quite a while since there has been any activity. Are there plans to continue maintaining this library?
Tests print a lot of data to the screen (according to a side comment in #20) - review test output to stdout and tidy up if needed
[==========] 14 tests from 1 test suite ran. (98439 ms total)
[ PASSED ] 14 tests.
This was built with Win 10 MSVS 2015.
The current issue is with GLOG this is the bug report: conan-io/conan-center-index#2494
I stubbed in "Spacelm" suggestion of:
#ifdef _WIN32
#ifndef MINGW32
#define GOOGLE_GLOG_DLL_DECL
#endif
#endif
( don't you just love those little magic incantations .... sigh)
before every glog include ... and she built.
My suggestion is make no changes just wait for that bug fix and rebuild.
Thanks and regards
Carl
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.