Giter VIP home page Giter VIP logo

Comments (11)

tbreloff avatar tbreloff commented on May 17, 2024

Seems like this might make sense to be another linetype, which defaults to :step or something similar when not implemented. If you can create the chart you'd like using the linetypes that exist already, it should be pretty easy to add.

from plots.jl.

lobingera avatar lobingera commented on May 17, 2024

@JeffreySarnoff
Can you please give more examples? Is this line styles, so styling the line that is drawn, or is this about markers that show additional information at certain samples?

On my own plotting agenda i had for some times some ideas (pending) to deal in plots or a plotting engine even with markers that are not predefined, but somehow read-in or imported. Think about using a marker defined by some draw imported from a .svg file. Plotting then could be a 2D plot with x-y lines on one value of a timeline and a second value selecting a marker out of a set of markers.

from plots.jl.

tbreloff avatar tbreloff commented on May 17, 2024

Part of this request is to allow for many marker styles, which would be great, but I suspect may be hard to accomplish depending on the plotting backend. I agree it would be great to have a library of markers to choose from, and if the svg is stored within Plots.jl, it may be possible to pass in custom markers to some of the backends. Right now I'm only using markers built into the backends.

from plots.jl.

JeffreySarnoff avatar JeffreySarnoff commented on May 17, 2024

@lobingera
This gets difficult, I imagine, as I have not seen it done very accessibly elsewhere. Ultimately, my preoccupation with regard to plots is presenting additionally informative elements without sacrificing visual clarity. When working with stock prices or fuzzy numbers there are sub-aspects that are significant without being sufficient to well-represent the information at a 'point'.

For a daily plot of a stock, people use vertical stick for the high-low range with two thin horizontal tabs for the open (leftward) and close (rightward) prices. Volume is often shown as a second plot below the price plot. To incorporate volume into the primary plot, I might map volume into a blue--red (less(cold)--more(hot)) colorspace and colorcode each vertical stick accordingly. If I had more information, the vertical sticks might become ovoids or thin superellipses.

To do this requires smart, composable and context-aware markers. To do similar with fuzzy information requires the same of curvilinear plot subdivisions.
These thoughts are offered as perspective, just so nothing done interferes with building up to such capability.

from plots.jl.

lobingera avatar lobingera commented on May 17, 2024

@JeffreySarnoff
This might look difficult, but if we lay the foundations of markers that are called/rendered with input parameters, your example falls into the easier category because the marker is plotted independently of the surrounding graph, it's just more info at the same x-position. I can follow your text, but can you please somehow attach a picture here?

from plots.jl.

tbreloff avatar tbreloff commented on May 17, 2024

So on some level this is pretty easy to do with certain backends (gadfly/immerse comes to mind). Similar to how it's done with boxplots, the y input could be a tuple of (open,high,low,close) (either vector of tuples, or tuple of vectors), and I'd create a custom compose context on the fly for each x. I borrowed some code from @dcjones to start supporting some other marker shapes, and I could do nearly the same thing for alternate custom plots like OHLC.

What would be most helpful is a detailed description of what your ideal visual looks like, so pictures/drawings are helpful.

from plots.jl.

JeffreySarnoff avatar JeffreySarnoff commented on May 17, 2024

ok .. I can paint something tomorrow.

from plots.jl.

tbreloff avatar tbreloff commented on May 17, 2024

I started playing around with passing in vectors of tuples, and then fiddled with making a new polygon, and then... I was done?

julia> using Plots

julia> n=10; hgt=rand(n)+1; bot=randn(n); openpct=rand(n); closepct=rand(n);

julia> y = [(openpct[i]*hgt[i]+bot[i], bot[i]+hgt[i], bot[i], closepct[i]*hgt[i]+bot[i]) for i in 1:n];

julia> plot(y, linetype=:ohlc, markersize=10)

tmp

from plots.jl.

tbreloff avatar tbreloff commented on May 17, 2024

I'm going to close this, but please don't let that stop you from adding a drawing of an alternative shape.

from plots.jl.

JeffreySarnoff avatar JeffreySarnoff commented on May 17, 2024

a graph that conveys uncertainty using intensity
http://andrewgelman.com/wp-content/uploads/2012/08/hsiang1-300x225.jpg
from http://andrewgelman.com/2012/08/26/graphs-showing-regression-uncertainty-the-code/

from plots.jl.

tbreloff avatar tbreloff commented on May 17, 2024

This is quite different from the OHLC charting. I think, to make this graph, you would want to attach a color scheme based on a z-coordinate. Gadfly has this ability, and I certainly intend to support it. I'd say give me a few days and you should be able to do this very simply.

from plots.jl.

Related Issues (20)

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.