Giter VIP home page Giter VIP logo

cpplot's People

Contributors

thclark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpplot's Issues

Add cpp linting and file checking to pre-commit config

Add one or more of:

  • cpplint
  • clang-check
  • cppcheck

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:

  • remove-crlf - Replace CRLF end-lines by LF ones before committing
  • remove-tabs - Replace tabs by whitespaces before committing

from https://github.com/Lucas-C/pre-commit-hooks

can not build

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!

Conan Support

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

Validate schema compliance at generation time

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++.

Fully backgrounded figure write tasks

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??

fatal error: matplot/detail/exports.h: No such file or directory

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.




cpr dependency not building on Windows MSVS 2015

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.

Implement documentation on RTD

Use the es-flow documentation as a basis to implement proper documentation for cpplot.

Include at first:

  • Installation
  • Getting Started
  • Examples based on the test cases
  • Library API generation

Timeseries Support

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..

Doc not quite right

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

Code review

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:

  • are reasonably experienced software engineers, familiar with C++
  • have their own use cases for / are already using the library
  • are willing to spend an hour on a call with me or write an overview of their suggestions / areas for improvement

Suppress/tidy test output

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

Add workaround to issue in conan's GLOG build/link process for windows

[==========] 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.