Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot(table) methods #34

Open
48 tasks
apjanke opened this issue Apr 25, 2019 · 2 comments
Open
48 tasks

plot(table) methods #34

apjanke opened this issue Apr 25, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request tables The table stuff
Milestone

Comments

@apjanke
Copy link
Owner

apjanke commented Apr 25, 2019

Write methods that lets you say plot(tbl, keyCol) and have it plot its contents as timeseries, scatter plots, and so on.

Right now you have to say:

plot(C.Key, [C.A2 C.A3 C.B2 C.B3])
xlabel('Key')
legend({'A2' 'A2' 'B2' 'B3'})
  • Should take the specified column as X, and all the other columns (or a user-specified set of columns) as Y.
    • Maybe it should even default to taking the first column as X, and the remaining columns as Y.
  • Should automatically fill in the XLabel and legend.
  • For timetable, should automatically take Row Times as X by default
  • Maybe support timeseries, too

In addition, it should support stairs, scatter, maybe histogram, stackedplot, boxplot, maybe bar and barh, and so on.

As far as I can tell, Matlab does not support this.

What you should probably do is write this plotting toolkit as a layer on top of table and base handle graphics plotting, and publish it as a Matlab toolbox, too.

Also consider how plotting would work for timetable objects. Maybe this stuff could be factored out to a shared mixin superclass.

Plots to include

2-D plots

  • plot
  • plotyy
  • semilogx
  • semilogy
  • loglog
  • bar
  • barh
  • hist
  • stemleaf
  • stairs
  • stem
  • stem3
  • scatter
  • plotmatrix
  • pareto
  • rose
  • contour
  • contourf
  • contourc
  • contour3
  • errorbar
  • semilogxerr
  • semilogyerr
  • loglogerr
  • polar
  • pie
  • pie3
  • quiver
  • quiver3
  • compass
  • feather
  • pcolor
  • area

3-D plots

  • mesh
  • meshc
  • meshz
  • surf
  • surfc
  • surfl
  • surfnorm
  • isosurface
  • isonormals
  • isocaps
  • plot3
  • slice
  • ribbon
  • scatter3
  • waterfall

Sheesh, that's a lot of plotting functions. Maybe this isn't such a great idea. I don't know how much value the convenience of plotting from a table has vs that work.

On the other hand, the work is probably just proportional to how much it takes to map variable names and values to inputs of the underlying plot calls, which is what all users of tables would have to do in their absence, so it might be a good value.

Maybe just do the more commonly used plotting functions. If nothing else, adding these would be a good test of whether I have decent example data sets available in Octave or Tablicious, and would be good practice using these functions.

@apjanke apjanke added the enhancement New feature or request label Apr 25, 2019
@apjanke apjanke self-assigned this Apr 25, 2019
@apjanke apjanke changed the title plot(table) method plot(table) methods Apr 25, 2019
@apjanke
Copy link
Owner Author

apjanke commented May 3, 2019

Actually, these shouldn't go in table itself; they should go in a separate tableplot class or namespace. They don't need access to table's internals, and they're not part of the Matlab API for it.

@apjanke apjanke added the tables The table stuff label May 5, 2019
@apjanke apjanke added this to the 1.0.0 milestone Jan 17, 2020
@Rakshith-sakhamuri
Copy link

Hi @apjanke ,
I would like to contribute to solve this , I am a beginner to openSource. but I have experience in C and C++,Please guide me to solve this.
Thank You.

@apjanke apjanke moved this to Low priority in Octave-Tablicious Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tables The table stuff
Projects
Status: Low priority
Development

No branches or pull requests

2 participants