Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5d79a28

Browse filesBrowse files
committed
convert gl2d and gl3d tick angles from deg to radians
1 parent b2f07f7 commit 5d79a28
Copy full SHA for 5d79a28

File tree

2 files changed

+6
-2
lines changed
Filter options

2 files changed

+6
-2
lines changed

‎src/plots/gl2d/convert.js

Copy file name to clipboardExpand all lines: src/plots/gl2d/convert.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ proto.merge = function(options) {
123123

124124
this.tickEnable[i+j] = false;
125125
this.tickColor[i+j] = str2RGBArray((ax.tickfont || {}).color);
126-
this.tickAngle[i+j] = (ax.tickangle === 'auto') ? 0 : -ax.tickangle;
126+
this.tickAngle[i+j] = (ax.tickangle === 'auto') ?
127+
0 :
128+
Math.PI * -ax.tickangle / 180;
127129
this.tickPad[i+j] = this.getTickPad(ax);
128130

129131
this.tickMarkLength[i+j] = 0;

‎src/plots/gl3d/layout/convert.js

Copy file name to clipboardExpand all lines: src/plots/gl3d/layout/convert.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ proto.merge = function(sceneLayout) {
109109
if ('tickcolor' in axes) opts.lineTickColor[i] = str2RgbaArray(axes.tickcolor);
110110
if ('tickwidth' in axes) opts.lineTickWidth[i] = axes.tickwidth;
111111
if ('tickangle' in axes) {
112-
opts.tickAngle[i] = axes.tickangle === 'auto' ? 0 : axes.tickangle;
112+
opts.tickAngle[i] = (axes.tickangle === 'auto') ?
113+
0 :
114+
Math.PI * -axes.tickangle / 180;
113115
}
114116
//// tick labels
115117
if ('showticklabels' in axes) opts.tickEnable[i] = axes.showticklabels;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.