diff --git a/ChangeLog.md b/ChangeLog.md index 5b93acd8..ecd816b7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -14,7 +14,10 @@ Emperor 0.9.1 (changes since Emperor 0.9.0 go here) * The "Colors" tab now has a selector, which allows to use the arrows to move between categories. * Default coloring scheme is discrete. * Add color pickers for the axes and axes labels. +* To take a screenshot (PNG) of your current visualization you can press `ctrl+p`. +* Export to SVG your visualization. * Emperor now relies on QIIME 1.7.0. +* Added option `--number_of_segments` to control the quality of all spheres *Bug Fixes* diff --git a/LICENSE.md b/LICENSE.md index 9ac3990a..e0a947ed 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -167,4 +167,57 @@ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------------------- + +### THREEx.screenshot [v1](http://learningthreejs.com/data/THREEx/docs/THREEx.screenshot.html) +[repository](https://github.com/jeromeetienne/threex) + +Copyright (c) 2011 Jerome Etienne, http://jetienne.com + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +### FileSaver.js [283e78fd3c](https://github.com/eligrey/FileSaver.js/) + +Copyright (c) 2011 [Eli Grey](http://eligrey.com). + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/emperor/format.py b/emperor/format.py index 0b3f3b75..f1205716 100755 --- a/emperor/format.py +++ b/emperor/format.py @@ -30,7 +30,8 @@ class EmperorLogicError(ValueError): pass def format_pcoa_to_js(header, coords, eigvals, pct_var, custom_axes=[], - coords_low=None, coords_high=None, number_of_axes=10): + coords_low=None, coords_high=None, number_of_axes=10, + number_of_segments=8): """Write the javascript necessary to represent a pcoa file in emperor Inputs: @@ -41,6 +42,8 @@ def format_pcoa_to_js(header, coords, eigvals, pct_var, custom_axes=[], custom_axes: list of category names for the custom axes coords_low: coordinates representing the lower edges of an ellipse coords_high: coordinates representing the highere edges of an ellipse + number_of_axes: number of axes to be returned + number_of_segments: number of segments and rings for each sphere Output: string: javascript representation of the PCoA data inputed, contains a list @@ -98,8 +101,9 @@ def format_pcoa_to_js(header, coords, eigvals, pct_var, custom_axes=[], "'color': 0, 'width': %f, 'height': %f, 'length': %f , 'x': %f," " 'y': %f, 'z': %f, %s }\n" % (s_header, s_header,delta[0], delta[1], delta[2], s_coord[0], s_coord[1], s_coord[2], all_coords)) - - js_pcoa_string += 'var g_segments = 16, g_rings = 16, g_radius = %f;\n' % (radius) + + js_pcoa_string += 'var g_segments = %d, g_rings = %d, g_radius = %f;\n' % (number_of_segments, + number_of_segments, radius) js_pcoa_string += 'var g_xAxisLength = %f;\n' % (abs(max_x)+abs(min_x)) js_pcoa_string += 'var g_yAxisLength = %f;\n' % (abs(max_y)+abs(min_y)) js_pcoa_string += 'var g_zAxisLength = %f;\n' % (abs(max_z)+abs(min_z)) @@ -409,7 +413,11 @@ def format_emperor_html_footer_string(has_biplots=False, has_ellipses=False, + + +