-
Notifications
You must be signed in to change notification settings - Fork 220
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
Feature wishlist #50
Comments
Hi, There is no general wishlist/todo... opened issues and pull requests kind of act as one :) But it could be a good idea to have something somewhere (wiki for example... I still have an open pull request for more documentation!). Current or short-term todo for me: A bit more long term: As for your suggestions: |
It's indeed good to know your plans before trying more myself. If we're talking documentation, I also love the ggplot style cheatsheet. But I haven't investigated yet how they made it, so I don't know if it's a lot of work. I was unaware of |
Is datetime support already a feature. Because it fails for me.
|
No, but datenum() works... saves me the hassle of needing to check Matlab versions for yet another thing! t1 = datenum(2017,8,1,8,0,0);
t2 = datenum(2017,8,5,8,0,0);
t = t1:t2;
y = 1:numel(t);
g=gramm('x',t,'y',y);
g.geom_point();
g.set_datetick('x')
figure;
g.draw; |
Is it possible to display a legend when no grouping variable is used? Maybe I'm too stupid but I can't seem to get the legend displayed in this case. |
@Leberer It's not possible currently as legends display grouping variables and not geom/stats. If there is only a single group the legend is not displayed. I'm not sure about what you want to achieve in your case though: a point with the legend "data points" and a line with the legend "smoothed line"? This seems like a lot of work for an edge case: what is plotted is typically in the Y axis label or title, and details like that in the figure text legend. An optional additional line of text in the legend (a kind of "side title") could be doable though, would that be useful? |
Hi Pier, A question that is perhaps related to custom axes margins. Is it already possible to make custom axes widths/heights? For example in a facet_grid or in multiple calls to gramm. I couldn't find it in the documentation (only space=free, but then the space depends on the data, not on my own choice). With subplot it's possible to make for example the left axes 2x wider than the right axes. This is sometimes nice with a trend plot and a histogram next to each other, where you want to put the emphasis on the trend plot. |
Hi Matthijs, It is already possible to do that in the "multiple gramm call" case as gramm figures can be created in UIpanels. It's a bit hackish but works: see issue #40 . When I change things on axes spacing I will see if I can make that less hackish. Apart from that, it's currently not possible to have custom facet width/heights beyond the data driven 'space','free'. However I think that for facets it makes little sense to have anything else (not to mention that since they are data driven, custom sizes might break if the number of facets changes). |
For those who get notifications from this thread... recent commits added a lot of requested customization features (see my edited "wishlist" above). The latest one allows to fully customize sizes @matthijscox ! Let me know how that works for you. |
That looks great! I see you also updated the cheatsheet, so we'll have a go with it. |
Thanks for such a beautiful package! Not sure if this fits here but I wonder if there's a way to plot all columns of a table as Y vectors using the length (or a defined column vector). I was thinking about doing something like:
The whole |
Hi Matia, I'll try to answer for Pier. I think what you want is to use the facet_wrap or facet_grid functionality, together with converting your data to single columns for gramm. Here is an example:
|
Thanks for the help in answering @matthijscox ! Your answer is indeed spot on... to be even faster with the conversion from "wide" table to "long" table, this can be done in a single line using stack(). There is actually an example related to this in examples.m |
Hi Pier, I haven't been in need for adaptions for GRAMM for a while now, but maybe I found one. I wanted to show some (binary) sequences in a nice way. For this purpose I hacked some changes into stat_bin2d to allow customized sizing and posititioning, for example:
The shift I essentially only needed to center the squares with the tick labels. P.S. I also created a hack a while ago to remove the axes entirely, but keep the tick labels... |
Hi @matthijscox , That looks great and pull-request worthy! Do you think there would be a way to compute the shift automatically from the size if there is not other reason for it than alignment? As for binary sequences, this looks like something potentially related to geom_raster as well, have you looked into it? |
Hi @piermorel, As far as I understood geom_raster only draws points or lines, I wanted squares with different spacing in x and y. But maybe I misunderstood the function. If I read the equivalent ggplot2 documentation it is what I want, but GRAMM only seems to draw lines:
An automated shift would be nice indeed (something like a 'center' option), but I couldn't figure out the math quickly yet from the code. You use the hist2d function, which does some automated positioning. Also I still had to manually update the XLim and YLim with a shift. I also like the ability to remove the axes, but the function I made now fails when you do manual resizing (it essentially places white axes without tick labels on top of the old ones). I'm not very happy with the all of this code yet... but if you like I can make a pull request for the size and shift in stat_bin2d to see what you think. But perhaps I should try to make a geom_tile method, using some of the stat_bin2d patch generation code?
|
Dear Pierre, gramm is extremely helpful and great! I've been trying for days to do a simple thing though and now decided to bug you for help. I think it's not possible to do what I want but maybe it is: When I run stat_glm does plot separate lines always and automatically. Any clue how this could work? Thanks so much! Andy |
Hi Andy, What you are looking for is Hope that helps ! |
Awesome, thanks so much! |
Hello!
This is just a recommendation. I'm sure users can find a work around to the problems I've listed. I love gramm 💯 |
Hi! It seems that some markers are not displayed by geom_points() function. In the code, by default in the parameter 'MarkerEdgeColor' is set to 'none'. Example case:
but can be made visible by adding a line
Could the function display also those markers and set their color automatically? Best regards, Jakub |
Hi Pier,
Personally, I had the wish for some extra features (do you have a general wish/todo list somewhere?):
The axes spacing and margins seemed to be hardcoded right now, so that one looks quite hard to change.
The vector plots would require an additional input interface, like
'xend'
and'yend'
indicating the end of the vectors. Or alternatively you could use a length input'dx'
,'dy'
.The text was updated successfully, but these errors were encountered: