Giter Club home page Giter Club logo

simpleplots.jl's Introduction

SimplePlots.jl

Plots in 5 seconds or your money back

Stable Dev Build Status Codecov


  • To load use:
] add https://github.com/djsegal/SimplePlots.jl
using SimplePlots
  • A simple test case is:
scatter(
  rand(10), label="Scatter", color=4,
  xlabel="x", markersize=6
)

ylabel!("y")

cur_x = 10 .^ (0:0.1:1)
cur_y = rand(0.25:0.05:0.75, length(cur_x))

plot!(cur_x, cur_y, label="Plot", color=3, title="Example")

hline!([1,3] ./ 4, color=2)
vline!(5, linewidth=4, alpha=0.4, linestyle=:dash)

plot!(xlim=(1,15))

ylims!(0,1)
xscale!(:log10)

Example Plot

simpleplots.jl's People

Contributors

djsegal 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

Watchers

 avatar  avatar

Forkers

dpsanders

simpleplots.jl's Issues

Need to parse range in outer module's scope

In gui.jl, we use:

cur_range = @eval $(cur_range)

This evaluates it within the SimplePlots scope. Need to evaluate in outer package in case they have structs of their own.


i.e. the following breaks at the moment:

cur_widget = slider(1:10, label="foo", value=3)
@gui bar in cur_widget
  ...
end

to remedy you currently need to copy and paste cur_widget's contents into the bar assignment

@demo with CompositePlot...how to see both plots?

I'm trying to do a @demo visualization with some sliders that affect the output on two different plots, but I can't seem to get it to display both plots at the same time.

Here's some pseudocode to give you an idea of what I'm doing and what I've tried:

@demo for a in a_min:a_step:a_max, b in b_min:b_step:b_max
    calc_results = do_some_calculations(a, b)
    p1 = plot(calc_results)
    plot!(p1, more_stuff)
    p2 = plot(whatever_else)
    plot!(p2, even_more_stuff)
    # now here are several things that *don't* work...
    plot(p1, p2) # this gives only the sliders and the second plot
    CompositePlot([p1, p2]) # same thing, just sliders and p2
    show(CompositePlot([p1, p2]) # this gives a TON of text that gets truncated
end

Is this a bug or do I have the syntax wrong?

type SimplePlot has no field id

] add https://github.com/djsegal/SimplePlots.jl
using SimplePlots
scatter(rand(10), label="Scatter", color=4, xlabel="x", markersize=6)

type SimplePlot has no field id
getproperty(::SimplePlots.SimplePlot, ::Symbol) at Base.jl:33
displayinplotpane(::SimplePlots.SimplePlot) at showdisplay.jl:33
displayandrender(::SimplePlots.SimplePlot) at showdisplay.jl:131
(::Atom.var"#189#193"{String})() at eval.jl:126
#invokelatest#1 at essentials.jl:712 [inlined]
invokelatest at essentials.jl:711 [inlined]
macro expansion at dynamic.jl:24 [inlined]
eval(::String, ::Int64, ::String, ::String, ::Bool) at eval.jl:105
macro expansion at eval.jl:39 [inlined]
(::Atom.var"#172#173")() at task.jl:358

Handle plot(f,a,b...)

Plotting a function over [a,b] through this syntax, with plot!(f) adding a plot is a real nice recipe. Could this be added?

Reload Plotly on page refresh

If someone refreshes page, Plotly.js will not be there.

Make a little javascript that lives on the page that re-adds Plotly script if this happens

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.