We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0794d8 commit 8a82463Copy full SHA for 8a82463
lib/gnuplotrb/plot.rb
@@ -298,7 +298,7 @@ def new_with_options(options)
298
end
299
300
def set_name_from_daru_dataframe(dataframe)
301
- self.title = dataframe.name
+ self.title = dataframe.name unless title
302
303
304
spec/plot_spec.rb
@@ -57,6 +57,14 @@
57
it 'takes name for plot from DataFrame' do
58
expect(subject.title).to eql(df.name)
59
60
+
61
+ context 'with title option given' do
62
+ subject { Plot.new(df, title: 'Not a DataFrame') }
63
64
+ it "uses title option instead of DataFrame name" do
65
+ expect(subject.title).not_to eql(df.name)
66
+ end
67
68
69
70
0 commit comments