Code Monkey home page Code Monkey logo

plot's Introduction

plot's People

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

Watchers

 avatar  avatar  avatar  avatar

plot's Issues

max(a, b) template function error

./src/plot/plot_lib.hpp:3915:11: error: no matching function for call to 'max'
          utils::max(1l, rct.p2.y/cell_rows + (rct.p2.y%cell_rows != 0)) }
          ^~~~~~~~~~
./src/plot/plot_lib.hpp:59:24: note: candidate template ignored: deduced conflicting types for parameter 'T' ('long' vs. 'int')
    inline constexpr T max(T a, T b) {
                       ^

Identical error in a few more places.

Fixed by adding this to utils:

template<typename T, typename _T>
    inline constexpr T max(T a, _T b) {
        return (a >= b) ? a : b;
    }

Probably should do this to min() too.

clang++-3.9
-g -MMD -MP -std=c++14

Design and implement plotting API

Design a plotting API (so that this library starts doing what it's meant to do ๐Ÿ˜„).
It should feature various axis options, plot styles, automatic scaling, function/range/container data sources, automatic label placement.
It should also be interoperable with the animation API to be implemented per #15.

An acceptable feature set should bring the library on par with UnicodePlots

Decide whether to turn on -Wshadow on CI builds

@hjmjohnson I'm seeking your advice here.

After merging #8 and a small fix in class TerminalInfo, all -Wshadow warning are gone in clang. Gcc is still complaining, though, and it's being a bit too pedantic IMHO.

Clang seems to accept member shadowing at least in struct constructors (like Color), and this makes sense to me. Moreover, gcc complains about many cases like this:

BrailleCanvas& rect(Color const& stroke, Color const& fill, Rect rect, TerminalOp op = TerminalOp::Over)

Where argument rect would shadow the method. I don't think there could be confusion here and I believe it's a pretty common case. It seems I'm not alone (see [1] and [2]). Clang 3.9 takes it without complaints.

So the question is: should I fix those errors and enable shadow warnings on continuous integration builds, or leave the code as it is and keep building without -Wshadow? Or maybe switch CI build environment to clang?

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.