[Yt-svn] commit/yt: MatthewTurk: * Fixed bug where the transform was always set to log base e.
Bitbucket
commits-noreply at bitbucket.org
Wed Apr 27 15:25:13 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/dfa84db4e415/
changeset: r4217:dfa84db4e415
branch: yt
user: MatthewTurk
date: 2011-04-28 00:22:51
summary: * Fixed bug where the transform was always set to log base e.
* Use set_current_field instead of manually touching PW internals
* Mandate (for now) exponential form of linear values
* Move the rhs_panel to the right to allow enough room for variables to
display
affected #: 3 files (176 bytes)
--- a/yt/gui/reason/extdirect_repl.py Wed Apr 27 15:00:26 2011 -0700
+++ b/yt/gui/reason/extdirect_repl.py Wed Apr 27 18:22:51 2011 -0400
@@ -380,8 +380,7 @@
DLE, DRE = _tpf.domain_left_edge, _tpf.domain_right_edge
from yt.visualization.plot_window import PWViewerExtJS
_tpw = PWViewerExtJS(_tsl, (DLE[_txax], DRE[_txax], DLE[_tyax], DRE[_tyax]), setup = False)
- _tpw._current_field = _tfield
- _tpw._field_transform["%(field)s"] = na.log
+ _tpw.set_current_field("%(field)s")
_tfield_list = list(set(_tpf.h.field_list + _tpf.h.derived_field_list))
_tfield_list.sort()
_tcb = _tpw._get_cbar_image()
@@ -420,8 +419,7 @@
DLE, DRE = _tpf.domain_left_edge, _tpf.domain_right_edge
from yt.visualization.plot_window import PWViewerExtJS
_tpw = PWViewerExtJS(_tsl, (DLE[_txax], DRE[_txax], DLE[_tyax], DRE[_tyax]), setup = False)
- _tpw._current_field = _tfield
- _tpw.set_log(_tfield, True)
+ _tpw.set_current_field("%(field)s")
_tfield_list = list(set(_tpf.h.field_list + _tpf.h.derived_field_list))
_tfield_list.sort()
_tcb = _tpw._get_cbar_image()
--- a/yt/gui/reason/html/js/widget_plotwindow.js Wed Apr 27 15:00:26 2011 -0700
+++ b/yt/gui/reason/html/js/widget_plotwindow.js Wed Apr 27 18:22:51 2011 -0400
@@ -114,10 +114,10 @@
xtype: 'panel',
id: 'ticks_' + python_varname,
layout: 'absolute',
- y: 10,
+ y: 0,
x: 540,
- width: 40,
- height: 400,
+ width: 100,
+ height: 420,
items : [],
border: false,
}, { xtype: 'multislider',
@@ -334,9 +334,9 @@
xtype: 'panel',
layout: 'vbox',
id: 'rhs_panel_' + python_varname,
- width: 300,
+ width: 250,
height: 460,
- x: 590, y: 10,
+ x: 690, y: 10,
layoutConfig: {
align: 'stretch',
pack: 'start',
@@ -383,21 +383,22 @@
metadata_string = payload['metadata_string'];
ticks.removeAll();
Ext.each(payload['ticks'], function(tick, index) {
+ console.log(tick);
ticks.add({xtype:'panel',
width: 10, height:1,
style: 'background-color: #000000;',
html:' ',
- x:0, y: tick[0]});
+ x:0, y: 10 + tick[0]});
ticks.add({xtype:'panel',
- width: 30, height:15,
+ width: 90, height:15,
border: false,
style: 'font-family: "Inconsolata", monospace;' +
'font-size: 12px;',
- html: ' ' + tick[2] + ' ',
- x:12, y: tick[0]-6});
+ html: '' + tick[2] + '',
+ x:12, y: 4 + tick[0]});
examine = tick;
});
- //examine = ticks;
+ examine = payload['ticks'];
ticks.doLayout();
}
--- a/yt/visualization/plot_window.py Wed Apr 27 15:00:26 2011 -0700
+++ b/yt/visualization/plot_window.py Wed Apr 27 18:22:51 2011 -0400
@@ -374,7 +374,8 @@
tick_locs = ll(mi, ma)
for v in tick_locs:
p = height - height * (v - mi)/(ma-mi)
- ticks.append((p,v,v))
+ ticks.append((p,v,"%0.3e" % (v)))
+ print "Ticking: ", p, v, v
return ticks
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list