Skip to content

Commit

Permalink
fix #7264 plot2d axis
Browse files Browse the repository at this point in the history
  • Loading branch information
moellep committed Sep 19, 2024
1 parent 94851a3 commit ad32d97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sirepo/package_data/static/js/sirepo-plotting.js
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ SIREPO.app.service('plot2dService', function(appState, layoutService, panelState
};
function init() {
$scope.select('svg.sr-plot').attr('height', plotting.initialHeight($scope));
delete $scope.axes.y2;
$.each($scope.axes, function(dim, axis) {
axis.init();
axis.grid = axis.createAxis();
Expand Down Expand Up @@ -2538,7 +2539,7 @@ SIREPO.app.directive('plot2d', function(focusPointService, plotting, plot2dServi

$scope.init = function() {
plot2dService.init2dPlot($scope, {
margin: {top: 50, right: 10, bottom: 50, left: 75},
margin: {top: 50, right: 10, bottom: 20, left: 75},
});
$scope.focusPoints.push(
focusPointService.setupFocusPoint($scope.axes.x, $scope.axes.y, false));
Expand Down Expand Up @@ -2574,6 +2575,7 @@ SIREPO.app.directive('plot2d', function(focusPointService, plotting, plot2dServi
});

$scope.updatePlot(json);
$scope.resize();
};

$scope.recalculateYDomain = function() {
Expand Down Expand Up @@ -4080,7 +4082,7 @@ SIREPO.app.directive('particle', function(plotting, plot2dService) {

$scope.init = function() {
plot2dService.init2dPlot($scope, {
margin: {top: 50, right: 23, bottom: 50, left: 75},
margin: {top: 50, right: 23, bottom: 20, left: 75},
});
};

Expand Down

0 comments on commit ad32d97

Please sign in to comment.