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

Add vertical layout option and variable names usage to riemann_tools. #103

Merged
merged 1 commit into from
Apr 30, 2015

Conversation

ketch
Copy link
Member

@ketch ketch commented Apr 30, 2015

Stacking the plots vertically seems helpful since they all share the same x-axis anyway. The default is still to put them side-by-side.

See plots near the end of http://nbviewer.ipython.org/gist/ketch/445f886de2d09c763f1b for examples of how this looks (and how to call it).

@mandli
Copy link
Member

mandli commented Apr 30, 2015

Looks great!

mandli added a commit that referenced this pull request Apr 30, 2015
Add vertical layout option and variable names usage to riemann_tools.
@mandli mandli merged commit f64bcfa into clawpack:master Apr 30, 2015
@rjleveque
Copy link
Member

@maojrs and I took a look and like it. One suggestion would be to leave the axes black but make the plots of the solution blue so that it's clearer what part is just axes.

Also we are thinking that it might be nice to adopt a color code for different wave types in all the x-t plots, e.g. green for rarefactions, red for shocks, magenta for contact discontinuities / linear waves. Would this look too busy?

If the system has more than 3 equations, we might want to separate into two columns. E.g. for elasticity, put the 3 sigma components in one column and the 2 velocities in a second column, all linked to the slider in the x-t plane? And maybe have the x-t plot in the second column in this case (or swap the columns). Don't know how hard it would be to automate this.

@ketch
Copy link
Member Author

ketch commented May 5, 2015

@maojrs and I took a look and like it. One suggestion would be to leave the axes black but make the plots of the solution blue so that it's clearer what part is just axes.

We are already using blue (and other colors) for plotting exact and approximate solutions together. Rather than changing that, I tried setting the axes to a pale grey. Please take a look at http://nbviewer.ipython.org/gist/ketch/0a7397cbd3f1d937d1be and let me know what you think.

Also we are thinking that it might be nice to adopt a color code for different wave types in all the x-t plots, e.g. green for rarefactions, red for shocks, magenta for contact discontinuities / linear waves. Would this look too busy?

Again, we've already used color to distinguish different solutions. I think rarefactions are already easy to distinguish, since we plot 5 characteristics in the fan, with a thinner line. We could plot shocks with a thicker line to distinguish them from contact discontinuities, but then the plot_riemann() function needs to somehow know which is which.

If the system has more than 3 equations, we might want to separate into two columns. E.g. for elasticity, put the 3 sigma components in one column and the 2 velocities in a second column, all linked to the slider in the x-t plane? And maybe have the x-t plot in the second column in this case (or swap the columns). Don't know how hard it would be to automate this.

I agree; I think we can do this easily when we come to such a system.

@maojrs
Copy link
Contributor

maojrs commented May 6, 2015

@ketch I think it looks good, though I think some color might make the figures more attractive. We could also use blue for the solutions and colors for the comparison. I don't think it would be confusing as long as we have a legend. We could go either way.

For the shock/rarefaction/cd I think making the shock thicker would be enough, so we don't have too many colors. However, when plotting along the phase plane, colors could help the reader associate if the characteristic comes from an Hugoniot loci or an integral curve, like in the interactive shallow water eqs. app. Maybe we could limit the use of colors for characteristics to only the interactive apps?

@ketch
Copy link
Member Author

ketch commented May 6, 2015

I made a little diagram of the different plots and how we are differentiating things currently:

https://atlas.mindmup.com/2015/05/d8333240d6210132471802816939bc82/riemann_book_plots/index.html

You should have received a link that will allow you to edit it (no login required).

@ketch
Copy link
Member Author

ketch commented May 6, 2015

Thanks for the suggestions; it's definitely worth thinking hard about how to present all the plots.

I like black for the exact solution since it is a reminder that it is special (relative to the various approximate solutions). I'm generally opposed to modifying plots for purely aesthetical reasons that do not improve clarity.

I do like your use of color in the interactive SW phase plane plots; we should probably be careful that the colors used there are not the same ones used to distinguish different approximate Riemann solutions in other plots. Another option would be to just make the integral curves fainter/thinner, to match what is done with the rarefaction characteristics -- that could help associate the two in the reader's mind.

@rjleveque
Copy link
Member

I can see your diagram from the link above but not from the one I was emailed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants