Comments (11)
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.
@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.
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.
@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.
@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.
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.
ok .. I can paint something tomorrow.
from plots.jl.
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)
from plots.jl.
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.
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.
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)
- Replace Formatting.jl by Format.jl[FR] HOT 1
- [BUG] Heatmap doesnt error when its passed the wrong x-axes and y-axes HOT 1
- [BUG] areaplot! failing with layout
- [BUG]Formatting.jl is deprecated HOT 1
- [FR] Retrieve Plot Attributes HOT 1
- [BUG] Plots fails to install on MacOS (arm64) with Julia 1.10 HOT 4
- [BUG] `ylims` does not respect `yflip=true`
- [BUG] pythonplot backend not working: UndefVarError: `pyisnone` not defined HOT 2
- PythonCall.pyisnone() does not exist, please remove it from source code HOT 1
- [BUG] heatmap output shifts relative to axis when using logarithmic xscale and setting xlims on GR HOT 1
- [BUG] Arrow does not work with pgfplotsx
- Warning when loading Plotly backend
- [BUG] Huge vertical margin of `plot_title` HOT 8
- [FR] Improve the `xticks!` dosctring
- [FR] savefig("foo.svgz") (gzip-compressed SVG) HOT 1
- [BUG] grouping Measurement data leads to wrong errorbars in plot
- [BUG] PGFPlotsX doesn't colour certain markers in a scatter plot.
- Support for PlotlyKaleido@2
- Feature request: add keyword to make Julia wait until plot window closes
- [BUG] Julia 1.10.2 fails when trying to add or use Plots issuing Pkg.add("Plots") or using Plots HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plots.jl.