Skip to content

introduce caption helper method #59

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

Merged
merged 1 commit into from
Jun 12, 2015
Merged

Conversation

BRONSOLO
Copy link
Member

@chriddyp - thoughts? related: #58

Examples

STRIP

%---strip--%
subplot(2,2,1); plot(rand(1,100),'r-*'); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 1');
subplot(2,2,2); plot(rand(1,100),'r-o'); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 2');
subplot(2,1,2); plot(rand(1,100)); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 3');
p = plotlyfig(gcf, 'filename', 'test_caption_strip'); 
p.add_caption('Note: Test caption describing the context of this experiment.'); 
p.plotly; 

screen shot 2015-06-11 at 12 37 43 pm

NO STRIP

%---no strip--%
subplot(2,2,1); plot(rand(1,100),'r-*'); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 1');
subplot(2,2,2); plot(rand(1,100),'r-o'); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 2');
subplot(2,1,2); plot(rand(1,100)); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 3');
p = plotlyfig(gcf, 'filename', 'test_caption_no_strip', 'strip', false); 
p.add_caption('Note: Test caption describing the context of this experiment.'); 
p.plotly; 

screen shot 2015-06-11 at 12 37 24 pm

NO STRIP STYLE

%---no strip + style--%
subplot(2,2,1); plot(rand(1,100),'r-*'); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 1');
subplot(2,2,2); plot(rand(1,100),'r-o'); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 2');
subplot(2,1,2); plot(rand(1,100)); xlabel('time (s)'); ylabel('position (m)'); title('Sensor 3');
p = plotlyfig(gcf, 'filename', 'test_caption_no_strip_style', 'strip', false); 

% caption style
font.size = 24;
borderwidth = 2; 
bordercolor = 'rgb(1,1,1)';
x = 0.12; 
y = -0.01; 

% add the caption style as key/value args
p.add_caption('Note: Test caption describing the context of this experiment.',...
    'font', font, 'borderwidth', borderwidth, 'bordercolor', bordercolor, ...
    'x', x, 'y', y); 
p.plotly; 

screen shot 2015-06-11 at 12 37 54 pm

@chriddyp
Copy link
Member

beauty! and it looks good with just a single plot too? doesn't cover up the xaxis?

@BRONSOLO
Copy link
Member Author

Yep! some single-plot examples:

screen shot 2015-06-11 at 2 19 50 pm
screen shot 2015-06-11 at 2 20 10 pm
screen shot 2015-06-11 at 2 20 29 pm

@chriddyp
Copy link
Member

nice! :dancwr:

BRONSOLO added a commit that referenced this pull request Jun 12, 2015
@BRONSOLO BRONSOLO merged commit ec7506c into master Jun 12, 2015
@BRONSOLO BRONSOLO deleted the plotly_captions_wrapper branch July 8, 2015 15:00
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.

2 participants