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

fixing issue 162 + issue 233 #270

Closed
wants to merge 6 commits into from
Closed

fixing issue 162 + issue 233 #270

wants to merge 6 commits into from

Conversation

benaliabderrahmane
Copy link
Contributor

plotly now support when one or both data vectors are Datetime or Duration objects.

@benaliabderrahmane benaliabderrahmane linked an issue Aug 2, 2021 that may be closed by this pull request
% - For other OSs uses java to retrieve the user.home directory

if ispc
% userDir = winqueryreg('HKEY_CURRENT_USER',...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep these comments? I don't understand if they are helpful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which one ?

% case 2
% param = oauth.percentEncodeString(params{i});
% value = oauth.percentEncodeString(params{i+1});
% header = http_getContentTypeHeader(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

end


function [str,header] = http_paramsToString(params,encodeOption)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these entire files being recommitted? It doesn't look like they have changed at all? This makes it very difficult to review your code.

if isnumeric(axis_data.XLim)
xaxis.range = axis_data.XLim;

elseif isduration(axis_data.XLim)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice


if strcmp(axis_data.YTickLabelMode,'auto')

%-xaxis range-%
if isnumeric(axis_data.YLim)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way that you can make this more DRY? It seems like you have essentially the same code for the X and Y access. Can you put this into a function that works for both axes for example? https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually a lot of field are changed and we're not changing the same field each time so it won't be optimal to write everything in a function don't you think

@@ -0,0 +1,26 @@
function [converted,type] = convertDuration(duration)
if (strcmpi(duration.Format,'s'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be using a switch/case statement?

@benaliabderrahmane benaliabderrahmane requested review from jackparmer and VolKa79 and removed request for jackparmer August 3, 2021 14:43
@xarico10
Copy link
Contributor

xarico10 commented Aug 3, 2021

It's supporting DataTime and Duration objects.
Captura de Pantalla 2021-08-03 a la(s) 3 22 04 p  m
Captura de Pantalla 2021-08-03 a la(s) 3 22 15 p  m

Next step is to make X-axis ticks match!. I guess you could ask @jackparmer to create a separate issue so it counts as multiple fixed issues for you.

@jackparmer
Copy link
Contributor

Yeah, the x-axis range looks different in the 2 figures. Please solve that within this pull request.

@benaliabderrahmane benaliabderrahmane changed the title fixing issue 162 fixing issue 162 + issue 233 Aug 4, 2021
@benaliabderrahmane benaliabderrahmane marked this pull request as draft August 4, 2021 14:59
@benaliabderrahmane benaliabderrahmane linked an issue Aug 4, 2021 that may be closed by this pull request
@benaliabderrahmane benaliabderrahmane self-assigned this Aug 4, 2021
@benaliabderrahmane benaliabderrahmane removed the request for review from harshpurwar August 4, 2021 20:09
@jackparmer
Copy link
Contributor

@benaliabderrahmane what is the status of this?

Are you ready for another review?

Copy link
Contributor Author

@benaliabderrahmane benaliabderrahmane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no I changed the statut to draft, actually I'm re-writing all the updateAxes code to make it more DRY, and this pull request is going to close 3 issue at a time. I'm going to update the code tomorrow


if strcmp(axis_data.YTickLabelMode,'auto')

%-xaxis range-%
if isnumeric(axis_data.YLim)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually a lot of field are changed and we're not changing the same field each time so it won't be optimal to write everything in a function don't you think

@benaliabderrahmane
Copy link
Contributor Author

@benaliabderrahmane what is the status of this?

Are you ready for another review?
no I changed the statut to draft, actually I'm re-writing all the updateAxes code to make it more DRY, and this pull request is going to close 3 issue at a time. I'm going to update the code tomorrow

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.

Datetime/duration format not supported
3 participants